<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<title>OpenCV: cv::Mat Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../tutorial-utils.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
   &#160;<span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="../../d2/d55/classcv_1_1Mat-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::Mat Class Reference<div class="ingroups"><a class="el" href="../../d0/de1/group__core.html">Core functionality</a> &raquo; <a class="el" href="../../dc/d84/group__core__basic.html">Basic structures</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>n-dimensional dense array class  
 <a href="../../d3/d63/classcv_1_1Mat.html#details">More...</a></p>

<p><code>#include &lt;opencv2/core/mat.hpp&gt;</code></p>
<div class="dynheader">
Inheritance diagram for cv::Mat:</div>
<div class="dyncontent">
 <div class="center">
  <img src="../../d3/d63/classcv_1_1Mat.png" usemap="#cv::Mat_map" alt=""/>
  <map id="cv::Mat_map" name="cv::Mat_map">
<area href="../../df/dfc/classcv_1_1Mat__.html" title="Template matrix class derived from Mat. " alt="cv::Mat_&lt; _Tp &gt;" shape="rect" coords="0,56,166,80"/>
<area href="../../df/dfc/classcv_1_1Mat__.html" alt="cv::Mat_&lt; double &gt;" shape="rect" coords="176,56,342,80"/>
<area href="../../df/dfc/classcv_1_1Mat__.html" alt="cv::Mat_&lt; float &gt;" shape="rect" coords="352,56,518,80"/>
<area href="../../df/dfc/classcv_1_1Mat__.html" alt="cv::Mat_&lt; uchar &gt;" shape="rect" coords="528,56,694,80"/>
<area href="../../df/dfc/classcv_1_1Mat__.html" alt="cv::Mat_&lt; unsigned char &gt;" shape="rect" coords="704,56,870,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:aa6207c8cf9a3e442f153dc0241aea600"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br />
&#160;&#160;<a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa6207c8cf9a3e442f153dc0241aea600a2082a2faa4b65dedcc5b84433c97f817">MAGIC_VAL</a> = 0x42FF0000, 
<br />
&#160;&#160;<a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa6207c8cf9a3e442f153dc0241aea600a1c147538fd896f4f9abce9eaea9727e3">AUTO_STEP</a> = 0, 
<br />
&#160;&#160;<a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa6207c8cf9a3e442f153dc0241aea600a3a50403178ba15a9617f5ff341418cf9">CONTINUOUS_FLAG</a> = CV_MAT_CONT_FLAG, 
<br />
&#160;&#160;<a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa6207c8cf9a3e442f153dc0241aea600a1db725f4a7efd16a41581b4fc54e7aad">SUBMATRIX_FLAG</a> = CV_SUBMAT_FLAG
<br />
 }</td></tr>
<tr class="separator:aa6207c8cf9a3e442f153dc0241aea600"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada7179f86462918c8eee640292962739"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br />
&#160;&#160;<a class="el" href="../../d3/d63/classcv_1_1Mat.html#ada7179f86462918c8eee640292962739a1b2031796886cd80edd90640bc17fb50">MAGIC_MASK</a> = 0xFFFF0000, 
<br />
&#160;&#160;<a class="el" href="../../d3/d63/classcv_1_1Mat.html#ada7179f86462918c8eee640292962739a03b3e6a1defa1189b67c9f3d70b7c448">TYPE_MASK</a> = 0x00000FFF, 
<br />
&#160;&#160;<a class="el" href="../../d3/d63/classcv_1_1Mat.html#ada7179f86462918c8eee640292962739a1454580da17d20c8ec5917170dc3da3a">DEPTH_MASK</a> = 7
<br />
 }</td></tr>
<tr class="separator:ada7179f86462918c8eee640292962739"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2c4229732da267f1fe385458af3896d8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> () <a class="el" href="../../db/de0/group__core__utils.html#ga7b88772bee40b329b585a3a2157abd9b">CV_NOEXCEPT</a></td></tr>
<tr class="separator:a2c4229732da267f1fe385458af3896d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ec3402f7d165ca34c7fd6e8498a62ca"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a2ec3402f7d165ca34c7fd6e8498a62ca">Mat</a> (int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#abed816466c45234254d25bc59c31245e">rows</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa3e5a47585c9ef6a0842556739155e3e">cols</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>)</td></tr>
<tr class="separator:a2ec3402f7d165ca34c7fd6e8498a62ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75a97b1e4e55f380c172af58048a7cde"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a75a97b1e4e55f380c172af58048a7cde">Mat</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a146f8e8dda07d1365a575ab83d9828d1">size</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>)</td></tr>
<tr class="separator:a75a97b1e4e55f380c172af58048a7cde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3620c370690b5ca4d40c767be6fb4ceb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a3620c370690b5ca4d40c767be6fb4ceb">Mat</a> (int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#abed816466c45234254d25bc59c31245e">rows</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa3e5a47585c9ef6a0842556739155e3e">cols</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>, const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;s)</td></tr>
<tr class="separator:a3620c370690b5ca4d40c767be6fb4ceb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a286371a6196eaaaf0b86e158590460b7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a286371a6196eaaaf0b86e158590460b7">Mat</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a146f8e8dda07d1365a575ab83d9828d1">size</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>, const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;s)</td></tr>
<tr class="separator:a286371a6196eaaaf0b86e158590460b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a156df5a1326dd5c30b187b0e721a5f57"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a156df5a1326dd5c30b187b0e721a5f57">Mat</a> (int ndims, const int *sizes, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>)</td></tr>
<tr class="separator:a156df5a1326dd5c30b187b0e721a5f57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6adc4d64db5379bcbb713e71c9292f6e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a6adc4d64db5379bcbb713e71c9292f6e">Mat</a> (const std::vector&lt; int &gt; &amp;sizes, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>)</td></tr>
<tr class="separator:a6adc4d64db5379bcbb713e71c9292f6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbf34be80b7443123b2a032a67c3c4e3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#afbf34be80b7443123b2a032a67c3c4e3">Mat</a> (int ndims, const int *sizes, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>, const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;s)</td></tr>
<tr class="separator:afbf34be80b7443123b2a032a67c3c4e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad20a78b5501fc39543a240142a40e234"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#ad20a78b5501fc39543a240142a40e234">Mat</a> (const std::vector&lt; int &gt; &amp;sizes, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>, const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;s)</td></tr>
<tr class="separator:ad20a78b5501fc39543a240142a40e234"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a294eaf8a95d2f9c7be19ff594d06278e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a294eaf8a95d2f9c7be19ff594d06278e">Mat</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;m)</td></tr>
<tr class="separator:a294eaf8a95d2f9c7be19ff594d06278e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51615ebf17a64c968df0bf49b4de6a3a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a51615ebf17a64c968df0bf49b4de6a3a">Mat</a> (int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#abed816466c45234254d25bc59c31245e">rows</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa3e5a47585c9ef6a0842556739155e3e">cols</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>, void *<a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4d33bed1c850265370d2af0ff02e1564">data</a>, size_t <a class="el" href="../../d3/d63/classcv_1_1Mat.html#ab4b0843e64328eb2a026b5b9ede726fe">step</a>=<a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa6207c8cf9a3e442f153dc0241aea600a1c147538fd896f4f9abce9eaea9727e3">AUTO_STEP</a>)</td></tr>
<tr class="separator:a51615ebf17a64c968df0bf49b4de6a3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9fa74fb14362d87cb183453d2441948f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a9fa74fb14362d87cb183453d2441948f">Mat</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a146f8e8dda07d1365a575ab83d9828d1">size</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>, void *<a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4d33bed1c850265370d2af0ff02e1564">data</a>, size_t <a class="el" href="../../d3/d63/classcv_1_1Mat.html#ab4b0843e64328eb2a026b5b9ede726fe">step</a>=<a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa6207c8cf9a3e442f153dc0241aea600a1c147538fd896f4f9abce9eaea9727e3">AUTO_STEP</a>)</td></tr>
<tr class="separator:a9fa74fb14362d87cb183453d2441948f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fafc033e089143062fd31015b5d0f40"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a5fafc033e089143062fd31015b5d0f40">Mat</a> (int ndims, const int *sizes, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>, void *<a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4d33bed1c850265370d2af0ff02e1564">data</a>, const size_t *steps=0)</td></tr>
<tr class="separator:a5fafc033e089143062fd31015b5d0f40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a922de793eabcec705b3579c5f95a643e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a922de793eabcec705b3579c5f95a643e">Mat</a> (const std::vector&lt; int &gt; &amp;sizes, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>, void *<a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4d33bed1c850265370d2af0ff02e1564">data</a>, const size_t *steps=0)</td></tr>
<tr class="separator:a922de793eabcec705b3579c5f95a643e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92a3e9e5911a2eb0cf0950a0a9670c76"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a92a3e9e5911a2eb0cf0950a0a9670c76">Mat</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;m, const <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> &amp;<a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa6542193430356ad631a9beabc624107">rowRange</a>, const <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> &amp;<a class="el" href="../../d3/d63/classcv_1_1Mat.html#aadc8f9210fe4dec50513746c246fa8d9">colRange</a>=<a class="el" href="../../da/d35/classcv_1_1Range.html#af5a0207f6f98a69077db8e77898abc0f">Range::all</a>())</td></tr>
<tr class="separator:a92a3e9e5911a2eb0cf0950a0a9670c76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7ec97373406215f2d4bc72cc1d27036"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa7ec97373406215f2d4bc72cc1d27036">Mat</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;m, const <a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> &amp;roi)</td></tr>
<tr class="separator:aa7ec97373406215f2d4bc72cc1d27036"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afde22a742fc73c0a150a9002310ac2eb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#afde22a742fc73c0a150a9002310ac2eb">Mat</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;m, const <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> *ranges)</td></tr>
<tr class="separator:afde22a742fc73c0a150a9002310ac2eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6e903a6c762478692791a33d233019b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa6e903a6c762478692791a33d233019b">Mat</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;m, const std::vector&lt; <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> &gt; &amp;ranges)</td></tr>
<tr class="separator:aa6e903a6c762478692791a33d233019b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23b182c4ffd46abe38f460c1480ae887"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a23b182c4ffd46abe38f460c1480ae887"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a23b182c4ffd46abe38f460c1480ae887">Mat</a> (const std::vector&lt; _Tp &gt; &amp;vec, bool copyData=false)</td></tr>
<tr class="separator:a23b182c4ffd46abe38f460c1480ae887"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afccd5d581d7dc205925debf83ea4c7be"><td class="memTemplParams" colspan="2">template&lt;typename _Tp , typename  = typename std::enable_if&lt;std::is_arithmetic&lt;_Tp&gt;::value&gt;::type&gt; </td></tr>
<tr class="memitem:afccd5d581d7dc205925debf83ea4c7be"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#afccd5d581d7dc205925debf83ea4c7be">Mat</a> (const std::initializer_list&lt; _Tp &gt; list)</td></tr>
<tr class="separator:afccd5d581d7dc205925debf83ea4c7be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a174d591e68a4876f7164aefb1f3551d5"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a174d591e68a4876f7164aefb1f3551d5"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a174d591e68a4876f7164aefb1f3551d5">Mat</a> (const std::initializer_list&lt; int &gt; sizes, const std::initializer_list&lt; _Tp &gt; list)</td></tr>
<tr class="separator:a174d591e68a4876f7164aefb1f3551d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af831f6ce5e9ff546682e8155b5c835b1"><td class="memTemplParams" colspan="2">template&lt;typename _Tp , size_t _Nm&gt; </td></tr>
<tr class="memitem:af831f6ce5e9ff546682e8155b5c835b1"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#af831f6ce5e9ff546682e8155b5c835b1">Mat</a> (const std::array&lt; _Tp, _Nm &gt; &amp;arr, bool copyData=false)</td></tr>
<tr class="separator:af831f6ce5e9ff546682e8155b5c835b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a507e01fb48b34a3e5c45f9f5b00725e8"><td class="memTemplParams" colspan="2">template&lt;typename _Tp , int n&gt; </td></tr>
<tr class="memitem:a507e01fb48b34a3e5c45f9f5b00725e8"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a507e01fb48b34a3e5c45f9f5b00725e8">Mat</a> (const <a class="el" href="../../d6/dcf/classcv_1_1Vec.html">Vec</a>&lt; _Tp, n &gt; &amp;vec, bool copyData=true)</td></tr>
<tr class="separator:a507e01fb48b34a3e5c45f9f5b00725e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37068a8d9acc7cc5af817eb82b2aa83b"><td class="memTemplParams" colspan="2">template&lt;typename _Tp , int m, int n&gt; </td></tr>
<tr class="memitem:a37068a8d9acc7cc5af817eb82b2aa83b"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a37068a8d9acc7cc5af817eb82b2aa83b">Mat</a> (const <a class="el" href="../../de/de1/classcv_1_1Matx.html">Matx</a>&lt; _Tp, m, n &gt; &amp;mtx, bool copyData=true)</td></tr>
<tr class="separator:a37068a8d9acc7cc5af817eb82b2aa83b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a224477889ddc7424aaab1b76e7682ea2"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a224477889ddc7424aaab1b76e7682ea2"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a224477889ddc7424aaab1b76e7682ea2">Mat</a> (const <a class="el" href="../../db/d4e/classcv_1_1Point__.html">Point_</a>&lt; _Tp &gt; &amp;pt, bool copyData=true)</td></tr>
<tr class="separator:a224477889ddc7424aaab1b76e7682ea2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d72610ed5aed9117eb7933a97670309"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a7d72610ed5aed9117eb7933a97670309"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a7d72610ed5aed9117eb7933a97670309">Mat</a> (const <a class="el" href="../../df/d6c/classcv_1_1Point3__.html">Point3_</a>&lt; _Tp &gt; &amp;pt, bool copyData=true)</td></tr>
<tr class="separator:a7d72610ed5aed9117eb7933a97670309"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23957ae2fed348c67952c0d69c873972"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a23957ae2fed348c67952c0d69c873972"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a23957ae2fed348c67952c0d69c873972">Mat</a> (const <a class="el" href="../../d6/d9e/classcv_1_1MatCommaInitializer__.html">MatCommaInitializer_</a>&lt; _Tp &gt; &amp;commaInitializer)</td></tr>
<tr class="separator:a23957ae2fed348c67952c0d69c873972"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa82eca82664985c81c7912b04549370d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa82eca82664985c81c7912b04549370d">Mat</a> (const <a class="el" href="../../d0/d60/classcv_1_1cuda_1_1GpuMat.html">cuda::GpuMat</a> &amp;m)</td></tr>
<tr class="memdesc:aa82eca82664985c81c7912b04549370d"><td class="mdescLeft">&#160;</td><td class="mdescRight">download data from GpuMat  <a href="#aa82eca82664985c81c7912b04549370d">More...</a><br /></td></tr>
<tr class="separator:aa82eca82664985c81c7912b04549370d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcaeb226bafeff8a1b262f57f6ffbcc4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#adcaeb226bafeff8a1b262f57f6ffbcc4">Mat</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&amp;m)</td></tr>
<tr class="separator:adcaeb226bafeff8a1b262f57f6ffbcc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b2ae166171f6a7306cf09ff67a2153f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a1b2ae166171f6a7306cf09ff67a2153f">~Mat</a> ()</td></tr>
<tr class="memdesc:a1b2ae166171f6a7306cf09ff67a2153f"><td class="mdescLeft">&#160;</td><td class="mdescRight">destructor - calls <a class="el" href="../../d3/d63/classcv_1_1Mat.html#ae48d4913285518e2c21a3457017e716e" title="Decrements the reference counter and deallocates the matrix if needed. ">release()</a>  <a href="#a1b2ae166171f6a7306cf09ff67a2153f">More...</a><br /></td></tr>
<tr class="separator:a1b2ae166171f6a7306cf09ff67a2153f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d3794250e3dc39714f980b4d0d45864"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a9d3794250e3dc39714f980b4d0d45864">addref</a> ()</td></tr>
<tr class="memdesc:a9d3794250e3dc39714f980b4d0d45864"><td class="mdescLeft">&#160;</td><td class="mdescRight">Increments the reference counter.  <a href="#a9d3794250e3dc39714f980b4d0d45864">More...</a><br /></td></tr>
<tr class="separator:a9d3794250e3dc39714f980b4d0d45864"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2fece3507ee7e1284deee6da99e76b9b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a2fece3507ee7e1284deee6da99e76b9b">adjustROI</a> (int dtop, int dbottom, int dleft, int dright)</td></tr>
<tr class="memdesc:a2fece3507ee7e1284deee6da99e76b9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adjusts a submatrix size and position within the parent matrix.  <a href="#a2fece3507ee7e1284deee6da99e76b9b">More...</a><br /></td></tr>
<tr class="separator:a2fece3507ee7e1284deee6da99e76b9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8b3b4d7b9876a4726740b75daa98ddb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa8b3b4d7b9876a4726740b75daa98ddb">assignTo</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;m, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>=-1) const</td></tr>
<tr class="memdesc:aa8b3b4d7b9876a4726740b75daa98ddb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides a functional form of convertTo.  <a href="#aa8b3b4d7b9876a4726740b75daa98ddb">More...</a><br /></td></tr>
<tr class="separator:aa8b3b4d7b9876a4726740b75daa98ddb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5d20fc86d41d59e4d71ae93daee9726"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:aa5d20fc86d41d59e4d71ae93daee9726"><td class="memTemplItemLeft" align="right" valign="top">_Tp &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa5d20fc86d41d59e4d71ae93daee9726">at</a> (int i0=0)</td></tr>
<tr class="memdesc:aa5d20fc86d41d59e4d71ae93daee9726"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a reference to the specified array element.  <a href="#aa5d20fc86d41d59e4d71ae93daee9726">More...</a><br /></td></tr>
<tr class="separator:aa5d20fc86d41d59e4d71ae93daee9726"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a330d9adb78976b6efd4116c940924294"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a330d9adb78976b6efd4116c940924294"><td class="memTemplItemLeft" align="right" valign="top">const _Tp &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a330d9adb78976b6efd4116c940924294">at</a> (int i0=0) const</td></tr>
<tr class="separator:a330d9adb78976b6efd4116c940924294"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac40425b84f60b39fd35e03814122661f"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:ac40425b84f60b39fd35e03814122661f"><td class="memTemplItemLeft" align="right" valign="top">_Tp &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#ac40425b84f60b39fd35e03814122661f">at</a> (int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4b22e1c23af7a7f2eef8fa478cfa7434">row</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a23df02a07ffbfa4aa59c19bc003919fe">col</a>)</td></tr>
<tr class="separator:ac40425b84f60b39fd35e03814122661f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5db6b18954e334048cb35752f49c6f8c"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a5db6b18954e334048cb35752f49c6f8c"><td class="memTemplItemLeft" align="right" valign="top">const _Tp &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a5db6b18954e334048cb35752f49c6f8c">at</a> (int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4b22e1c23af7a7f2eef8fa478cfa7434">row</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a23df02a07ffbfa4aa59c19bc003919fe">col</a>) const</td></tr>
<tr class="separator:a5db6b18954e334048cb35752f49c6f8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a305829ed5c0ecfef7b44db18953048e8"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a305829ed5c0ecfef7b44db18953048e8"><td class="memTemplItemLeft" align="right" valign="top">_Tp &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a305829ed5c0ecfef7b44db18953048e8">at</a> (int i0, int i1, int i2)</td></tr>
<tr class="separator:a305829ed5c0ecfef7b44db18953048e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59c6c2d9db1cfba76d75addeeb4e6a84"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a59c6c2d9db1cfba76d75addeeb4e6a84"><td class="memTemplItemLeft" align="right" valign="top">const _Tp &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a59c6c2d9db1cfba76d75addeeb4e6a84">at</a> (int i0, int i1, int i2) const</td></tr>
<tr class="separator:a59c6c2d9db1cfba76d75addeeb4e6a84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a474bd5cdcf986672cfdc304f6be1cf64"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a474bd5cdcf986672cfdc304f6be1cf64"><td class="memTemplItemLeft" align="right" valign="top">_Tp &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a474bd5cdcf986672cfdc304f6be1cf64">at</a> (const int *idx)</td></tr>
<tr class="separator:a474bd5cdcf986672cfdc304f6be1cf64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2cbbb16670ae4d9aa747f19c24305213"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a2cbbb16670ae4d9aa747f19c24305213"><td class="memTemplItemLeft" align="right" valign="top">const _Tp &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a2cbbb16670ae4d9aa747f19c24305213">at</a> (const int *idx) const</td></tr>
<tr class="separator:a2cbbb16670ae4d9aa747f19c24305213"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ec1aadc17ab8c8f8334d521719c7732"><td class="memTemplParams" colspan="2">template&lt;typename _Tp , int n&gt; </td></tr>
<tr class="memitem:a9ec1aadc17ab8c8f8334d521719c7732"><td class="memTemplItemLeft" align="right" valign="top">_Tp &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a9ec1aadc17ab8c8f8334d521719c7732">at</a> (const <a class="el" href="../../d6/dcf/classcv_1_1Vec.html">Vec</a>&lt; int, n &gt; &amp;idx)</td></tr>
<tr class="separator:a9ec1aadc17ab8c8f8334d521719c7732"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15c649a94cf2e06240b32b025231301f"><td class="memTemplParams" colspan="2">template&lt;typename _Tp , int n&gt; </td></tr>
<tr class="memitem:a15c649a94cf2e06240b32b025231301f"><td class="memTemplItemLeft" align="right" valign="top">const _Tp &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a15c649a94cf2e06240b32b025231301f">at</a> (const <a class="el" href="../../d6/dcf/classcv_1_1Vec.html">Vec</a>&lt; int, n &gt; &amp;idx) const</td></tr>
<tr class="separator:a15c649a94cf2e06240b32b025231301f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23cd599a27c59bae64b0c40ad645ea49"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a23cd599a27c59bae64b0c40ad645ea49"><td class="memTemplItemLeft" align="right" valign="top">_Tp &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a23cd599a27c59bae64b0c40ad645ea49">at</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> pt)</td></tr>
<tr class="separator:a23cd599a27c59bae64b0c40ad645ea49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87d0b2e01b0f8686957398ecfb168a6d"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a87d0b2e01b0f8686957398ecfb168a6d"><td class="memTemplItemLeft" align="right" valign="top">const _Tp &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a87d0b2e01b0f8686957398ecfb168a6d">at</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> pt) const</td></tr>
<tr class="separator:a87d0b2e01b0f8686957398ecfb168a6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33ee3bc402827f587a5ad64b568d6986"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a33ee3bc402827f587a5ad64b568d6986"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="../../d4/dfe/classcv_1_1MatIterator__.html">MatIterator_</a>&lt; _Tp &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a33ee3bc402827f587a5ad64b568d6986">begin</a> ()</td></tr>
<tr class="memdesc:a33ee3bc402827f587a5ad64b568d6986"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the matrix iterator and sets it to the first matrix element.  <a href="#a33ee3bc402827f587a5ad64b568d6986">More...</a><br /></td></tr>
<tr class="separator:a33ee3bc402827f587a5ad64b568d6986"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef8f88bc1f72757b0f2ddb3041611c73"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:aef8f88bc1f72757b0f2ddb3041611c73"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="../../d1/de0/classcv_1_1MatConstIterator__.html">MatConstIterator_</a>&lt; _Tp &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aef8f88bc1f72757b0f2ddb3041611c73">begin</a> () const</td></tr>
<tr class="separator:aef8f88bc1f72757b0f2ddb3041611c73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa11336b9ac538e0475d840657ce164be"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa11336b9ac538e0475d840657ce164be">channels</a> () const</td></tr>
<tr class="memdesc:aa11336b9ac538e0475d840657ce164be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of matrix channels.  <a href="#aa11336b9ac538e0475d840657ce164be">More...</a><br /></td></tr>
<tr class="separator:aa11336b9ac538e0475d840657ce164be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a167a8e0a3a3d86e84b70e33483af4466"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a167a8e0a3a3d86e84b70e33483af4466">checkVector</a> (int elemChannels, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a8da9f853b6f3a29d738572fd1ffc44c0">depth</a>=-1, bool requireContinuous=true) const</td></tr>
<tr class="separator:a167a8e0a3a3d86e84b70e33483af4466"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adff2ea98da45eae0833e73582dd4a660"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#adff2ea98da45eae0833e73582dd4a660">clone</a> () const <a class="el" href="../../db/de0/group__core__utils.html#ga1a1bf6728a93cfa692a110252c252d03">CV_NODISCARD</a></td></tr>
<tr class="memdesc:adff2ea98da45eae0833e73582dd4a660"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a full copy of the array and the underlying data.  <a href="#adff2ea98da45eae0833e73582dd4a660">More...</a><br /></td></tr>
<tr class="separator:adff2ea98da45eae0833e73582dd4a660"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23df02a07ffbfa4aa59c19bc003919fe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a23df02a07ffbfa4aa59c19bc003919fe">col</a> (int x) const</td></tr>
<tr class="memdesc:a23df02a07ffbfa4aa59c19bc003919fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a matrix header for the specified matrix column.  <a href="#a23df02a07ffbfa4aa59c19bc003919fe">More...</a><br /></td></tr>
<tr class="separator:a23df02a07ffbfa4aa59c19bc003919fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadc8f9210fe4dec50513746c246fa8d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aadc8f9210fe4dec50513746c246fa8d9">colRange</a> (int startcol, int endcol) const</td></tr>
<tr class="memdesc:aadc8f9210fe4dec50513746c246fa8d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a matrix header for the specified column span.  <a href="#aadc8f9210fe4dec50513746c246fa8d9">More...</a><br /></td></tr>
<tr class="separator:aadc8f9210fe4dec50513746c246fa8d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acccb63e44eba6ba81ead99881bd1997e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#acccb63e44eba6ba81ead99881bd1997e">colRange</a> (const <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> &amp;r) const</td></tr>
<tr class="separator:acccb63e44eba6ba81ead99881bd1997e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf88c60c5b4980e05bb556080916978b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#adf88c60c5b4980e05bb556080916978b">convertTo</a> (<a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> m, int rtype, double alpha=1, double beta=0) const</td></tr>
<tr class="memdesc:adf88c60c5b4980e05bb556080916978b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts an array to another data type with optional scaling.  <a href="#adf88c60c5b4980e05bb556080916978b">More...</a><br /></td></tr>
<tr class="separator:adf88c60c5b4980e05bb556080916978b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39fd9880fc55b7a0993bcfff88061ac4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a39fd9880fc55b7a0993bcfff88061ac4">copySize</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;m)</td></tr>
<tr class="memdesc:a39fd9880fc55b7a0993bcfff88061ac4"><td class="mdescLeft">&#160;</td><td class="mdescRight">internal use function; properly re-allocates _size, _step arrays  <a href="#a39fd9880fc55b7a0993bcfff88061ac4">More...</a><br /></td></tr>
<tr class="separator:a39fd9880fc55b7a0993bcfff88061ac4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33fd5d125b4c302b0c9aa86980791a77"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a33fd5d125b4c302b0c9aa86980791a77">copyTo</a> (<a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> m) const</td></tr>
<tr class="memdesc:a33fd5d125b4c302b0c9aa86980791a77"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies the matrix to another one.  <a href="#a33fd5d125b4c302b0c9aa86980791a77">More...</a><br /></td></tr>
<tr class="separator:a33fd5d125b4c302b0c9aa86980791a77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a626fe5f96d02525e2604d2ad46dd574f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a626fe5f96d02525e2604d2ad46dd574f">copyTo</a> (<a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> m, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> mask) const</td></tr>
<tr class="separator:a626fe5f96d02525e2604d2ad46dd574f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55ced2c8d844d683ea9a725c60037ad0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a55ced2c8d844d683ea9a725c60037ad0">create</a> (int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#abed816466c45234254d25bc59c31245e">rows</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa3e5a47585c9ef6a0842556739155e3e">cols</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>)</td></tr>
<tr class="memdesc:a55ced2c8d844d683ea9a725c60037ad0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates new array data if needed.  <a href="#a55ced2c8d844d683ea9a725c60037ad0">More...</a><br /></td></tr>
<tr class="separator:a55ced2c8d844d683ea9a725c60037ad0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48409946d0e1bebb40fe765e18ec5eea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a48409946d0e1bebb40fe765e18ec5eea">create</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a146f8e8dda07d1365a575ab83d9828d1">size</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>)</td></tr>
<tr class="separator:a48409946d0e1bebb40fe765e18ec5eea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee53524ac61fa2ba441c4f29c3aca93f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aee53524ac61fa2ba441c4f29c3aca93f">create</a> (int ndims, const int *sizes, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>)</td></tr>
<tr class="separator:aee53524ac61fa2ba441c4f29c3aca93f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84f35d3923a92251631329eed66d2a12"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a84f35d3923a92251631329eed66d2a12">create</a> (const std::vector&lt; int &gt; &amp;sizes, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>)</td></tr>
<tr class="separator:a84f35d3923a92251631329eed66d2a12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a708b761e0d15b7b8db4c8e8c95a7abe9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a708b761e0d15b7b8db4c8e8c95a7abe9">cross</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> m) const</td></tr>
<tr class="memdesc:a708b761e0d15b7b8db4c8e8c95a7abe9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes a cross-product of two 3-element vectors.  <a href="#a708b761e0d15b7b8db4c8e8c95a7abe9">More...</a><br /></td></tr>
<tr class="separator:a708b761e0d15b7b8db4c8e8c95a7abe9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6e9cdf9b450e360f005978b4e981b1a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#ac6e9cdf9b450e360f005978b4e981b1a">deallocate</a> ()</td></tr>
<tr class="memdesc:ac6e9cdf9b450e360f005978b4e981b1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">internal use function, consider to use 'release' method instead; deallocates the matrix data  <a href="#ac6e9cdf9b450e360f005978b4e981b1a">More...</a><br /></td></tr>
<tr class="separator:ac6e9cdf9b450e360f005978b4e981b1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8da9f853b6f3a29d738572fd1ffc44c0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a8da9f853b6f3a29d738572fd1ffc44c0">depth</a> () const</td></tr>
<tr class="memdesc:a8da9f853b6f3a29d738572fd1ffc44c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the depth of a matrix element.  <a href="#a8da9f853b6f3a29d738572fd1ffc44c0">More...</a><br /></td></tr>
<tr class="separator:a8da9f853b6f3a29d738572fd1ffc44c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a024cc0510a4c61c7f266d4ab9fe13d7a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a024cc0510a4c61c7f266d4ab9fe13d7a">diag</a> (int d=0) const</td></tr>
<tr class="memdesc:a024cc0510a4c61c7f266d4ab9fe13d7a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extracts a diagonal from a matrix.  <a href="#a024cc0510a4c61c7f266d4ab9fe13d7a">More...</a><br /></td></tr>
<tr class="separator:a024cc0510a4c61c7f266d4ab9fe13d7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f683eab191eeece33dfc64ae299a9cb"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a0f683eab191eeece33dfc64ae299a9cb">dot</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> m) const</td></tr>
<tr class="memdesc:a0f683eab191eeece33dfc64ae299a9cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes a dot-product of two vectors.  <a href="#a0f683eab191eeece33dfc64ae299a9cb">More...</a><br /></td></tr>
<tr class="separator:a0f683eab191eeece33dfc64ae299a9cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba7a5ef00b22b70668fba575005dfe55"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aba7a5ef00b22b70668fba575005dfe55">elemSize</a> () const</td></tr>
<tr class="memdesc:aba7a5ef00b22b70668fba575005dfe55"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the matrix element size in bytes.  <a href="#aba7a5ef00b22b70668fba575005dfe55">More...</a><br /></td></tr>
<tr class="separator:aba7a5ef00b22b70668fba575005dfe55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9acde8f32d4b294558fb406bc05171bc"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a9acde8f32d4b294558fb406bc05171bc">elemSize1</a> () const</td></tr>
<tr class="memdesc:a9acde8f32d4b294558fb406bc05171bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the size of each matrix element channel in bytes.  <a href="#a9acde8f32d4b294558fb406bc05171bc">More...</a><br /></td></tr>
<tr class="separator:a9acde8f32d4b294558fb406bc05171bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abbec3525a852e77998aba034813fded4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#abbec3525a852e77998aba034813fded4">empty</a> () const</td></tr>
<tr class="memdesc:abbec3525a852e77998aba034813fded4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the array has no elements.  <a href="#abbec3525a852e77998aba034813fded4">More...</a><br /></td></tr>
<tr class="separator:abbec3525a852e77998aba034813fded4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9dd628eeccedea6e181ca54d41830a62"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a9dd628eeccedea6e181ca54d41830a62"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="../../d4/dfe/classcv_1_1MatIterator__.html">MatIterator_</a>&lt; _Tp &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a9dd628eeccedea6e181ca54d41830a62">end</a> ()</td></tr>
<tr class="memdesc:a9dd628eeccedea6e181ca54d41830a62"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the matrix iterator and sets it to the after-last matrix element.  <a href="#a9dd628eeccedea6e181ca54d41830a62">More...</a><br /></td></tr>
<tr class="separator:a9dd628eeccedea6e181ca54d41830a62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a092f54359c99e42729715024fc662182"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a092f54359c99e42729715024fc662182"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="../../d1/de0/classcv_1_1MatConstIterator__.html">MatConstIterator_</a>&lt; _Tp &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a092f54359c99e42729715024fc662182">end</a> () const</td></tr>
<tr class="separator:a092f54359c99e42729715024fc662182"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a952ef1a85d70a510240cb645a90efc0d"><td class="memTemplParams" colspan="2">template&lt;typename _Tp , typename Functor &gt; </td></tr>
<tr class="memitem:a952ef1a85d70a510240cb645a90efc0d"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a952ef1a85d70a510240cb645a90efc0d">forEach</a> (const Functor &amp;operation)</td></tr>
<tr class="memdesc:a952ef1a85d70a510240cb645a90efc0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Runs the given functor over all matrix elements in parallel.  <a href="#a952ef1a85d70a510240cb645a90efc0d">More...</a><br /></td></tr>
<tr class="separator:a952ef1a85d70a510240cb645a90efc0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afcee31e71fd6991148fd3bb619971e2b"><td class="memTemplParams" colspan="2">template&lt;typename _Tp , typename Functor &gt; </td></tr>
<tr class="memitem:afcee31e71fd6991148fd3bb619971e2b"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#afcee31e71fd6991148fd3bb619971e2b">forEach</a> (const Functor &amp;operation) const</td></tr>
<tr class="separator:afcee31e71fd6991148fd3bb619971e2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6df360cd5a78aa8a3fcf2d445b7e7764"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a6df360cd5a78aa8a3fcf2d445b7e7764">getUMat</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga6226c29c7b0e7bda7aff72e96ba8e1df">AccessFlag</a> accessFlags, <a class="el" href="../../dc/d84/group__core__basic.html#ga5681439dda418431eb0a672697135ed2">UMatUsageFlags</a> usageFlags=<a class="el" href="../../dc/d84/group__core__basic.html#gga5681439dda418431eb0a672697135ed2ae383b08ee18b73d8c1588d968f953893">USAGE_DEFAULT</a>) const</td></tr>
<tr class="memdesc:a6df360cd5a78aa8a3fcf2d445b7e7764"><td class="mdescLeft">&#160;</td><td class="mdescRight">retrieve <a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a> from <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a>  <a href="#a6df360cd5a78aa8a3fcf2d445b7e7764">More...</a><br /></td></tr>
<tr class="separator:a6df360cd5a78aa8a3fcf2d445b7e7764"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a039eb3c6740a850696a12519a4b8bfc6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a039eb3c6740a850696a12519a4b8bfc6">inv</a> (int method=<a class="el" href="../../d2/de8/group__core__array.html#ggaaf9ea5dcc392d5ae04eacb9920b9674ca247a3455cd64973152e17e26999dc024">DECOMP_LU</a>) const</td></tr>
<tr class="memdesc:a039eb3c6740a850696a12519a4b8bfc6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inverses a matrix.  <a href="#a039eb3c6740a850696a12519a4b8bfc6">More...</a><br /></td></tr>
<tr class="separator:a039eb3c6740a850696a12519a4b8bfc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa90cea495029c7d1ee0a41361ccecdf3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa90cea495029c7d1ee0a41361ccecdf3">isContinuous</a> () const</td></tr>
<tr class="memdesc:aa90cea495029c7d1ee0a41361ccecdf3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reports whether the matrix is continuous or not.  <a href="#aa90cea495029c7d1ee0a41361ccecdf3">More...</a><br /></td></tr>
<tr class="separator:aa90cea495029c7d1ee0a41361ccecdf3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab34367822008627e80e144d7bba3bd70"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#ab34367822008627e80e144d7bba3bd70">isSubmatrix</a> () const</td></tr>
<tr class="memdesc:ab34367822008627e80e144d7bba3bd70"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns true if the matrix is a submatrix of another matrix  <a href="#ab34367822008627e80e144d7bba3bd70">More...</a><br /></td></tr>
<tr class="separator:ab34367822008627e80e144d7bba3bd70"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40b5b3371a9c2a4b2b8ce0c8068d7c96"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a40b5b3371a9c2a4b2b8ce0c8068d7c96">locateROI</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;wholeSize, <a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> &amp;ofs) const</td></tr>
<tr class="memdesc:a40b5b3371a9c2a4b2b8ce0c8068d7c96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Locates the matrix header within a parent matrix.  <a href="#a40b5b3371a9c2a4b2b8ce0c8068d7c96">More...</a><br /></td></tr>
<tr class="separator:a40b5b3371a9c2a4b2b8ce0c8068d7c96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a385c09827713dc3e6d713bfad8460706"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a385c09827713dc3e6d713bfad8460706">mul</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> m, double scale=1) const</td></tr>
<tr class="memdesc:a385c09827713dc3e6d713bfad8460706"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs an element-wise multiplication or division of the two matrices.  <a href="#a385c09827713dc3e6d713bfad8460706">More...</a><br /></td></tr>
<tr class="separator:a385c09827713dc3e6d713bfad8460706"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75b1b5424cf014f00d8f06ba1818a5d8"><td class="memTemplParams" colspan="2">template&lt;typename _Tp , int m, int n&gt; </td></tr>
<tr class="memitem:a75b1b5424cf014f00d8f06ba1818a5d8"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a75b1b5424cf014f00d8f06ba1818a5d8">operator Matx&lt; _Tp, m, n &gt;</a> () const</td></tr>
<tr class="separator:a75b1b5424cf014f00d8f06ba1818a5d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3896b518731a7a1e9cbf59aef1168734"><td class="memTemplParams" colspan="2">template&lt;typename _Tp , std::size_t _Nm&gt; </td></tr>
<tr class="memitem:a3896b518731a7a1e9cbf59aef1168734"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a3896b518731a7a1e9cbf59aef1168734">operator std::array&lt; _Tp, _Nm &gt;</a> () const</td></tr>
<tr class="separator:a3896b518731a7a1e9cbf59aef1168734"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d043937e7a4cad632397a9dd8dfee2e"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a5d043937e7a4cad632397a9dd8dfee2e"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a5d043937e7a4cad632397a9dd8dfee2e">operator std::vector&lt; _Tp &gt;</a> () const</td></tr>
<tr class="separator:a5d043937e7a4cad632397a9dd8dfee2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4766cf75071f4e4db698c4120abe57b"><td class="memTemplParams" colspan="2">template&lt;typename _Tp , int n&gt; </td></tr>
<tr class="memitem:ae4766cf75071f4e4db698c4120abe57b"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#ae4766cf75071f4e4db698c4120abe57b">operator Vec&lt; _Tp, n &gt;</a> () const</td></tr>
<tr class="separator:ae4766cf75071f4e4db698c4120abe57b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad543b6bd296ae1247032c750af4718e1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#ad543b6bd296ae1247032c750af4718e1">operator()</a> (<a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa6542193430356ad631a9beabc624107">rowRange</a>, <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aadc8f9210fe4dec50513746c246fa8d9">colRange</a>) const</td></tr>
<tr class="memdesc:ad543b6bd296ae1247032c750af4718e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extracts a rectangular submatrix.  <a href="#ad543b6bd296ae1247032c750af4718e1">More...</a><br /></td></tr>
<tr class="separator:ad543b6bd296ae1247032c750af4718e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4272fce43d7405603fbb5e5f52580e57"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4272fce43d7405603fbb5e5f52580e57">operator()</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> &amp;roi) const</td></tr>
<tr class="separator:a4272fce43d7405603fbb5e5f52580e57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee56475f834069b1fad3877c0747aaeb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aee56475f834069b1fad3877c0747aaeb">operator()</a> (const <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> *ranges) const</td></tr>
<tr class="separator:aee56475f834069b1fad3877c0747aaeb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9bf4fcbb6e854a6db7b7254a205fac9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa9bf4fcbb6e854a6db7b7254a205fac9">operator()</a> (const std::vector&lt; <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> &gt; &amp;ranges) const</td></tr>
<tr class="separator:aa9bf4fcbb6e854a6db7b7254a205fac9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed1f81fe7efaacc2bd95149cdfa34302"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aed1f81fe7efaacc2bd95149cdfa34302">operator=</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;m)</td></tr>
<tr class="memdesc:aed1f81fe7efaacc2bd95149cdfa34302"><td class="mdescLeft">&#160;</td><td class="mdescRight">assignment operators  <a href="#aed1f81fe7efaacc2bd95149cdfa34302">More...</a><br /></td></tr>
<tr class="separator:aed1f81fe7efaacc2bd95149cdfa34302"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a0798475170fb3a23b5bc63686de334"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a2a0798475170fb3a23b5bc63686de334">operator=</a> (const <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a> &amp;expr)</td></tr>
<tr class="separator:a2a0798475170fb3a23b5bc63686de334"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5c947f7e449a4d856a4f3a87fcebd50"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa5c947f7e449a4d856a4f3a87fcebd50">operator=</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;s)</td></tr>
<tr class="memdesc:aa5c947f7e449a4d856a4f3a87fcebd50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets all or some of the array elements to the specified value.  <a href="#aa5c947f7e449a4d856a4f3a87fcebd50">More...</a><br /></td></tr>
<tr class="separator:aa5c947f7e449a4d856a4f3a87fcebd50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86d190d68dbd801a2bd555d0905979fd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a86d190d68dbd801a2bd555d0905979fd">operator=</a> (<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&amp;m)</td></tr>
<tr class="separator:a86d190d68dbd801a2bd555d0905979fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a88bbb01901fdfe3f1d0592c592e8757c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a88bbb01901fdfe3f1d0592c592e8757c">pop_back</a> (size_t nelems=1)</td></tr>
<tr class="memdesc:a88bbb01901fdfe3f1d0592c592e8757c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes elements from the bottom of the matrix.  <a href="#a88bbb01901fdfe3f1d0592c592e8757c">More...</a><br /></td></tr>
<tr class="separator:a88bbb01901fdfe3f1d0592c592e8757c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13acd320291229615ef15f96ff1ff738"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a13acd320291229615ef15f96ff1ff738">ptr</a> (int i0=0)</td></tr>
<tr class="memdesc:a13acd320291229615ef15f96ff1ff738"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a pointer to the specified matrix row.  <a href="#a13acd320291229615ef15f96ff1ff738">More...</a><br /></td></tr>
<tr class="separator:a13acd320291229615ef15f96ff1ff738"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af13f821918f452657f53bc3f750323cb"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#af13f821918f452657f53bc3f750323cb">ptr</a> (int i0=0) const</td></tr>
<tr class="separator:af13f821918f452657f53bc3f750323cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af774caab4a38c6f7890f3254ad71eccf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#af774caab4a38c6f7890f3254ad71eccf">ptr</a> (int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4b22e1c23af7a7f2eef8fa478cfa7434">row</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a23df02a07ffbfa4aa59c19bc003919fe">col</a>)</td></tr>
<tr class="separator:af774caab4a38c6f7890f3254ad71eccf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abcfcc1798528b49495e1263eab31127d"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#abcfcc1798528b49495e1263eab31127d">ptr</a> (int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4b22e1c23af7a7f2eef8fa478cfa7434">row</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a23df02a07ffbfa4aa59c19bc003919fe">col</a>) const</td></tr>
<tr class="separator:abcfcc1798528b49495e1263eab31127d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2bc0c6a23243540e16607868c17be92"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#ad2bc0c6a23243540e16607868c17be92">ptr</a> (int i0, int i1, int i2)</td></tr>
<tr class="separator:ad2bc0c6a23243540e16607868c17be92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfb233ffa8b26a78c36e733f61da2a3e"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#abfb233ffa8b26a78c36e733f61da2a3e">ptr</a> (int i0, int i1, int i2) const</td></tr>
<tr class="separator:abfb233ffa8b26a78c36e733f61da2a3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0e3de187bb27c384269b243e8789ba9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#ab0e3de187bb27c384269b243e8789ba9">ptr</a> (const int *idx)</td></tr>
<tr class="separator:ab0e3de187bb27c384269b243e8789ba9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ef72b9ebc9581796ed68382df8fb064"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a3ef72b9ebc9581796ed68382df8fb064">ptr</a> (const int *idx) const</td></tr>
<tr class="separator:a3ef72b9ebc9581796ed68382df8fb064"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ce1d8cc9a83ae7cab79766d0eb6c0a8"><td class="memTemplParams" colspan="2">template&lt;int n&gt; </td></tr>
<tr class="memitem:a7ce1d8cc9a83ae7cab79766d0eb6c0a8"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a7ce1d8cc9a83ae7cab79766d0eb6c0a8">ptr</a> (const <a class="el" href="../../d6/dcf/classcv_1_1Vec.html">Vec</a>&lt; int, n &gt; &amp;idx)</td></tr>
<tr class="separator:a7ce1d8cc9a83ae7cab79766d0eb6c0a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ea1a1bfbbb2393a4e162230dccbe1f0"><td class="memTemplParams" colspan="2">template&lt;int n&gt; </td></tr>
<tr class="memitem:a9ea1a1bfbbb2393a4e162230dccbe1f0"><td class="memTemplItemLeft" align="right" valign="top">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a9ea1a1bfbbb2393a4e162230dccbe1f0">ptr</a> (const <a class="el" href="../../d6/dcf/classcv_1_1Vec.html">Vec</a>&lt; int, n &gt; &amp;idx) const</td></tr>
<tr class="separator:a9ea1a1bfbbb2393a4e162230dccbe1f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a9ffc908ac90604f36a8b6a1038747d"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a5a9ffc908ac90604f36a8b6a1038747d"><td class="memTemplItemLeft" align="right" valign="top">_Tp *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a5a9ffc908ac90604f36a8b6a1038747d">ptr</a> (int i0=0)</td></tr>
<tr class="separator:a5a9ffc908ac90604f36a8b6a1038747d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a6b3696440fe48751bfe60fe2a729f3"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a6a6b3696440fe48751bfe60fe2a729f3"><td class="memTemplItemLeft" align="right" valign="top">const _Tp *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a6a6b3696440fe48751bfe60fe2a729f3">ptr</a> (int i0=0) const</td></tr>
<tr class="separator:a6a6b3696440fe48751bfe60fe2a729f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f4278ede80e7a9fe55d8b03710e2343"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a6f4278ede80e7a9fe55d8b03710e2343"><td class="memTemplItemLeft" align="right" valign="top">_Tp *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a6f4278ede80e7a9fe55d8b03710e2343">ptr</a> (int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4b22e1c23af7a7f2eef8fa478cfa7434">row</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a23df02a07ffbfa4aa59c19bc003919fe">col</a>)</td></tr>
<tr class="separator:a6f4278ede80e7a9fe55d8b03710e2343"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abda2b96aa438a808b43425040a7da81a"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:abda2b96aa438a808b43425040a7da81a"><td class="memTemplItemLeft" align="right" valign="top">const _Tp *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#abda2b96aa438a808b43425040a7da81a">ptr</a> (int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4b22e1c23af7a7f2eef8fa478cfa7434">row</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a23df02a07ffbfa4aa59c19bc003919fe">col</a>) const</td></tr>
<tr class="separator:abda2b96aa438a808b43425040a7da81a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2bf43f93c5cb610b657bd6e0e091c062"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a2bf43f93c5cb610b657bd6e0e091c062"><td class="memTemplItemLeft" align="right" valign="top">_Tp *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a2bf43f93c5cb610b657bd6e0e091c062">ptr</a> (int i0, int i1, int i2)</td></tr>
<tr class="separator:a2bf43f93c5cb610b657bd6e0e091c062"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a476f18d2b8d99748005150b24752512d"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a476f18d2b8d99748005150b24752512d"><td class="memTemplItemLeft" align="right" valign="top">const _Tp *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a476f18d2b8d99748005150b24752512d">ptr</a> (int i0, int i1, int i2) const</td></tr>
<tr class="separator:a476f18d2b8d99748005150b24752512d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7cb2719706bcae72d26dbc9b2fdc02e6"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a7cb2719706bcae72d26dbc9b2fdc02e6"><td class="memTemplItemLeft" align="right" valign="top">_Tp *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a7cb2719706bcae72d26dbc9b2fdc02e6">ptr</a> (const int *idx)</td></tr>
<tr class="separator:a7cb2719706bcae72d26dbc9b2fdc02e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac30da0a78cd38a72e8902f52660e2543"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:ac30da0a78cd38a72e8902f52660e2543"><td class="memTemplItemLeft" align="right" valign="top">const _Tp *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#ac30da0a78cd38a72e8902f52660e2543">ptr</a> (const int *idx) const</td></tr>
<tr class="separator:ac30da0a78cd38a72e8902f52660e2543"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36ab9a1de78fd00a4f9acf3c8a5d4d05"><td class="memTemplParams" colspan="2">template&lt;typename _Tp , int n&gt; </td></tr>
<tr class="memitem:a36ab9a1de78fd00a4f9acf3c8a5d4d05"><td class="memTemplItemLeft" align="right" valign="top">_Tp *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a36ab9a1de78fd00a4f9acf3c8a5d4d05">ptr</a> (const <a class="el" href="../../d6/dcf/classcv_1_1Vec.html">Vec</a>&lt; int, n &gt; &amp;idx)</td></tr>
<tr class="separator:a36ab9a1de78fd00a4f9acf3c8a5d4d05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15cac608c7a27fb961a81b9409aaa7e8"><td class="memTemplParams" colspan="2">template&lt;typename _Tp , int n&gt; </td></tr>
<tr class="memitem:a15cac608c7a27fb961a81b9409aaa7e8"><td class="memTemplItemLeft" align="right" valign="top">const _Tp *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a15cac608c7a27fb961a81b9409aaa7e8">ptr</a> (const <a class="el" href="../../d6/dcf/classcv_1_1Vec.html">Vec</a>&lt; int, n &gt; &amp;idx) const</td></tr>
<tr class="separator:a15cac608c7a27fb961a81b9409aaa7e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4bd5c2cb936dd363816d867aab22a61"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:af4bd5c2cb936dd363816d867aab22a61"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#af4bd5c2cb936dd363816d867aab22a61">push_back</a> (const _Tp &amp;elem)</td></tr>
<tr class="memdesc:af4bd5c2cb936dd363816d867aab22a61"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds elements to the bottom of the matrix.  <a href="#af4bd5c2cb936dd363816d867aab22a61">More...</a><br /></td></tr>
<tr class="separator:af4bd5c2cb936dd363816d867aab22a61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1cfeb3a75570697426971403fc1ddb0d"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a1cfeb3a75570697426971403fc1ddb0d"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a1cfeb3a75570697426971403fc1ddb0d">push_back</a> (const <a class="el" href="../../df/dfc/classcv_1_1Mat__.html">Mat_</a>&lt; _Tp &gt; &amp;elem)</td></tr>
<tr class="separator:a1cfeb3a75570697426971403fc1ddb0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fc040ee744749ba434fd5806ce2e3f2"><td class="memTemplParams" colspan="2">template&lt;typename _Tp &gt; </td></tr>
<tr class="memitem:a6fc040ee744749ba434fd5806ce2e3f2"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a6fc040ee744749ba434fd5806ce2e3f2">push_back</a> (const std::vector&lt; _Tp &gt; &amp;elem)</td></tr>
<tr class="separator:a6fc040ee744749ba434fd5806ce2e3f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3676bae1741459eda3771e8653357c53"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a3676bae1741459eda3771e8653357c53">push_back</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;m)</td></tr>
<tr class="separator:a3676bae1741459eda3771e8653357c53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57c658e2a97dda24fef1be2e625da914"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a57c658e2a97dda24fef1be2e625da914">push_back_</a> (const void *elem)</td></tr>
<tr class="memdesc:a57c658e2a97dda24fef1be2e625da914"><td class="mdescLeft">&#160;</td><td class="mdescRight">internal function  <a href="#a57c658e2a97dda24fef1be2e625da914">More...</a><br /></td></tr>
<tr class="separator:a57c658e2a97dda24fef1be2e625da914"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae48d4913285518e2c21a3457017e716e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#ae48d4913285518e2c21a3457017e716e">release</a> ()</td></tr>
<tr class="memdesc:ae48d4913285518e2c21a3457017e716e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrements the reference counter and deallocates the matrix if needed.  <a href="#ae48d4913285518e2c21a3457017e716e">More...</a><br /></td></tr>
<tr class="separator:ae48d4913285518e2c21a3457017e716e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0706ed6c42e288926c5ad415b976bbe2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a0706ed6c42e288926c5ad415b976bbe2">reserve</a> (size_t sz)</td></tr>
<tr class="memdesc:a0706ed6c42e288926c5ad415b976bbe2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reserves space for the certain number of rows.  <a href="#a0706ed6c42e288926c5ad415b976bbe2">More...</a><br /></td></tr>
<tr class="separator:a0706ed6c42e288926c5ad415b976bbe2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a923eead22fe7f0c48aa000158df920f3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a923eead22fe7f0c48aa000158df920f3">reserveBuffer</a> (size_t sz)</td></tr>
<tr class="memdesc:a923eead22fe7f0c48aa000158df920f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reserves space for the certain number of bytes.  <a href="#a923eead22fe7f0c48aa000158df920f3">More...</a><br /></td></tr>
<tr class="separator:a923eead22fe7f0c48aa000158df920f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4eb96e3251417fa88b78e2abd6cfd7d8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4eb96e3251417fa88b78e2abd6cfd7d8">reshape</a> (int cn, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#abed816466c45234254d25bc59c31245e">rows</a>=0) const</td></tr>
<tr class="memdesc:a4eb96e3251417fa88b78e2abd6cfd7d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the shape and/or the number of channels of a 2D matrix without copying the data.  <a href="#a4eb96e3251417fa88b78e2abd6cfd7d8">More...</a><br /></td></tr>
<tr class="separator:a4eb96e3251417fa88b78e2abd6cfd7d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a50e606fe51f53b896b66051634a018fb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a50e606fe51f53b896b66051634a018fb">reshape</a> (int cn, int newndims, const int *newsz) const</td></tr>
<tr class="separator:a50e606fe51f53b896b66051634a018fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2e41a510891e548f744832cf9b8ab89"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#ab2e41a510891e548f744832cf9b8ab89">reshape</a> (int cn, const std::vector&lt; int &gt; &amp;newshape) const</td></tr>
<tr class="separator:ab2e41a510891e548f744832cf9b8ab89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0127b138acfcc2dcd5dafc51175b309"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#ad0127b138acfcc2dcd5dafc51175b309">resize</a> (size_t sz)</td></tr>
<tr class="memdesc:ad0127b138acfcc2dcd5dafc51175b309"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the number of matrix rows.  <a href="#ad0127b138acfcc2dcd5dafc51175b309">More...</a><br /></td></tr>
<tr class="separator:ad0127b138acfcc2dcd5dafc51175b309"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abdbf4852beb3af95977fa289f6c7034c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#abdbf4852beb3af95977fa289f6c7034c">resize</a> (size_t sz, const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;s)</td></tr>
<tr class="separator:abdbf4852beb3af95977fa289f6c7034c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b22e1c23af7a7f2eef8fa478cfa7434"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4b22e1c23af7a7f2eef8fa478cfa7434">row</a> (int y) const</td></tr>
<tr class="memdesc:a4b22e1c23af7a7f2eef8fa478cfa7434"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a matrix header for the specified matrix row.  <a href="#a4b22e1c23af7a7f2eef8fa478cfa7434">More...</a><br /></td></tr>
<tr class="separator:a4b22e1c23af7a7f2eef8fa478cfa7434"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6542193430356ad631a9beabc624107"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa6542193430356ad631a9beabc624107">rowRange</a> (int startrow, int endrow) const</td></tr>
<tr class="memdesc:aa6542193430356ad631a9beabc624107"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a matrix header for the specified row span.  <a href="#aa6542193430356ad631a9beabc624107">More...</a><br /></td></tr>
<tr class="separator:aa6542193430356ad631a9beabc624107"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f5b8257ea38a26295944e9a69caf7e7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a6f5b8257ea38a26295944e9a69caf7e7">rowRange</a> (const <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> &amp;r) const</td></tr>
<tr class="separator:a6f5b8257ea38a26295944e9a69caf7e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0440e2a164c0b0d8462fb1e487be9876"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a0440e2a164c0b0d8462fb1e487be9876">setTo</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> value, <a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> mask=<a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>())</td></tr>
<tr class="memdesc:a0440e2a164c0b0d8462fb1e487be9876"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets all or some of the array elements to the specified value.  <a href="#a0440e2a164c0b0d8462fb1e487be9876">More...</a><br /></td></tr>
<tr class="separator:a0440e2a164c0b0d8462fb1e487be9876"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0066c8eee40c1706395b1e57f00e0857"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a0066c8eee40c1706395b1e57f00e0857">step1</a> (int i=0) const</td></tr>
<tr class="memdesc:a0066c8eee40c1706395b1e57f00e0857"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a normalized step.  <a href="#a0066c8eee40c1706395b1e57f00e0857">More...</a><br /></td></tr>
<tr class="separator:a0066c8eee40c1706395b1e57f00e0857"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa428c60ccb6d8ea5de18f63dfac8e11"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aaa428c60ccb6d8ea5de18f63dfac8e11">t</a> () const</td></tr>
<tr class="memdesc:aaa428c60ccb6d8ea5de18f63dfac8e11"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transposes a matrix.  <a href="#aaa428c60ccb6d8ea5de18f63dfac8e11">More...</a><br /></td></tr>
<tr class="separator:aaa428c60ccb6d8ea5de18f63dfac8e11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4d317d43fb0cba9c2503f3c61b866c8"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa4d317d43fb0cba9c2503f3c61b866c8">total</a> () const</td></tr>
<tr class="memdesc:aa4d317d43fb0cba9c2503f3c61b866c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the total number of array elements.  <a href="#aa4d317d43fb0cba9c2503f3c61b866c8">More...</a><br /></td></tr>
<tr class="separator:aa4d317d43fb0cba9c2503f3c61b866c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c506fc8b2cf52375e0d8be26aae0df4"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a5c506fc8b2cf52375e0d8be26aae0df4">total</a> (int startDim, int endDim=INT_MAX) const</td></tr>
<tr class="memdesc:a5c506fc8b2cf52375e0d8be26aae0df4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the total number of array elements.  <a href="#a5c506fc8b2cf52375e0d8be26aae0df4">More...</a><br /></td></tr>
<tr class="separator:a5c506fc8b2cf52375e0d8be26aae0df4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2d2652e552d7de635988f18a84b53e5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a> () const</td></tr>
<tr class="memdesc:af2d2652e552d7de635988f18a84b53e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the type of a matrix element.  <a href="#af2d2652e552d7de635988f18a84b53e5">More...</a><br /></td></tr>
<tr class="separator:af2d2652e552d7de635988f18a84b53e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3520c52cecff18ab7b243b2b45df7bc0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a3520c52cecff18ab7b243b2b45df7bc0">updateContinuityFlag</a> ()</td></tr>
<tr class="memdesc:a3520c52cecff18ab7b243b2b45df7bc0"><td class="mdescLeft">&#160;</td><td class="mdescRight">internal use method: updates the continuity flag  <a href="#a3520c52cecff18ab7b243b2b45df7bc0">More...</a><br /></td></tr>
<tr class="separator:a3520c52cecff18ab7b243b2b45df7bc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a0f81856dbcb93eae6113947edb3ea068"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a0f81856dbcb93eae6113947edb3ea068">diag</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;d)</td></tr>
<tr class="memdesc:a0f81856dbcb93eae6113947edb3ea068"><td class="mdescLeft">&#160;</td><td class="mdescRight">creates a diagonal matrix  <a href="#a0f81856dbcb93eae6113947edb3ea068">More...</a><br /></td></tr>
<tr class="separator:a0f81856dbcb93eae6113947edb3ea068"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2cf9b9acde7a9852542bbc20ef851ed2"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a2cf9b9acde7a9852542bbc20ef851ed2">eye</a> (int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#abed816466c45234254d25bc59c31245e">rows</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa3e5a47585c9ef6a0842556739155e3e">cols</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>)</td></tr>
<tr class="memdesc:a2cf9b9acde7a9852542bbc20ef851ed2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an identity matrix of the specified size and type.  <a href="#a2cf9b9acde7a9852542bbc20ef851ed2">More...</a><br /></td></tr>
<tr class="separator:a2cf9b9acde7a9852542bbc20ef851ed2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab87b56e1dc370ffe4afb735b6a1e5c9"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aab87b56e1dc370ffe4afb735b6a1e5c9">eye</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a146f8e8dda07d1365a575ab83d9828d1">size</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>)</td></tr>
<tr class="separator:aab87b56e1dc370ffe4afb735b6a1e5c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8aee95197c1ad458b37539bf9943ea80"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../df/d4c/classcv_1_1MatAllocator.html">MatAllocator</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a8aee95197c1ad458b37539bf9943ea80">getDefaultAllocator</a> ()</td></tr>
<tr class="separator:a8aee95197c1ad458b37539bf9943ea80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d5dda7d818009547d71a086d3d755a7"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../df/d4c/classcv_1_1MatAllocator.html">MatAllocator</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a8d5dda7d818009547d71a086d3d755a7">getStdAllocator</a> ()</td></tr>
<tr class="memdesc:a8d5dda7d818009547d71a086d3d755a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">and the standard allocator  <a href="#a8d5dda7d818009547d71a086d3d755a7">More...</a><br /></td></tr>
<tr class="separator:a8d5dda7d818009547d71a086d3d755a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69ae0402d116fc9c71908d8508dc2f09"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a69ae0402d116fc9c71908d8508dc2f09">ones</a> (int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#abed816466c45234254d25bc59c31245e">rows</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa3e5a47585c9ef6a0842556739155e3e">cols</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>)</td></tr>
<tr class="memdesc:a69ae0402d116fc9c71908d8508dc2f09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an array of all 1's of the specified size and type.  <a href="#a69ae0402d116fc9c71908d8508dc2f09">More...</a><br /></td></tr>
<tr class="separator:a69ae0402d116fc9c71908d8508dc2f09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc9c2c0b17ecd00932bc5fbc72f9bce0"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#afc9c2c0b17ecd00932bc5fbc72f9bce0">ones</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a146f8e8dda07d1365a575ab83d9828d1">size</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>)</td></tr>
<tr class="separator:afc9c2c0b17ecd00932bc5fbc72f9bce0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ed33f15d7bf0172efb62d61b3751284"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a6ed33f15d7bf0172efb62d61b3751284">ones</a> (int ndims, const int *sz, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>)</td></tr>
<tr class="separator:a6ed33f15d7bf0172efb62d61b3751284"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a536a771cbad0b8360091e0315ebfc524"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a536a771cbad0b8360091e0315ebfc524">setDefaultAllocator</a> (<a class="el" href="../../df/d4c/classcv_1_1MatAllocator.html">MatAllocator</a> *<a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4d2eb7a536cd5a0f18808b6112111d6a">allocator</a>)</td></tr>
<tr class="separator:a536a771cbad0b8360091e0315ebfc524"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b57b6a326c8876d944d188a46e0f556"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a0b57b6a326c8876d944d188a46e0f556">zeros</a> (int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#abed816466c45234254d25bc59c31245e">rows</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa3e5a47585c9ef6a0842556739155e3e">cols</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>)</td></tr>
<tr class="memdesc:a0b57b6a326c8876d944d188a46e0f556"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a zero array of the specified size and type.  <a href="#a0b57b6a326c8876d944d188a46e0f556">More...</a><br /></td></tr>
<tr class="separator:a0b57b6a326c8876d944d188a46e0f556"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a095db10924bc801644a29074a755b6e9"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a095db10924bc801644a29074a755b6e9">zeros</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a146f8e8dda07d1365a575ab83d9828d1">size</a>, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>)</td></tr>
<tr class="separator:a095db10924bc801644a29074a755b6e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a961cf7d4f82253d93bb5b8ff54522087"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a961cf7d4f82253d93bb5b8ff54522087">zeros</a> (int ndims, const int *sz, int <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>)</td></tr>
<tr class="separator:a961cf7d4f82253d93bb5b8ff54522087"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a4d2eb7a536cd5a0f18808b6112111d6a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../df/d4c/classcv_1_1MatAllocator.html">MatAllocator</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4d2eb7a536cd5a0f18808b6112111d6a">allocator</a></td></tr>
<tr class="memdesc:a4d2eb7a536cd5a0f18808b6112111d6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">custom allocator  <a href="#a4d2eb7a536cd5a0f18808b6112111d6a">More...</a><br /></td></tr>
<tr class="separator:a4d2eb7a536cd5a0f18808b6112111d6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3e5a47585c9ef6a0842556739155e3e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa3e5a47585c9ef6a0842556739155e3e">cols</a></td></tr>
<tr class="separator:aa3e5a47585c9ef6a0842556739155e3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d33bed1c850265370d2af0ff02e1564"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4d33bed1c850265370d2af0ff02e1564">data</a></td></tr>
<tr class="memdesc:a4d33bed1c850265370d2af0ff02e1564"><td class="mdescLeft">&#160;</td><td class="mdescRight">pointer to the data  <a href="#a4d33bed1c850265370d2af0ff02e1564">More...</a><br /></td></tr>
<tr class="separator:a4d33bed1c850265370d2af0ff02e1564"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae756e84c94cbcf4c152ed0e67edb71ca"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#ae756e84c94cbcf4c152ed0e67edb71ca">dataend</a></td></tr>
<tr class="separator:ae756e84c94cbcf4c152ed0e67edb71ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21a0a0eb9814f0093452601fcbdc8a46"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a21a0a0eb9814f0093452601fcbdc8a46">datalimit</a></td></tr>
<tr class="separator:a21a0a0eb9814f0093452601fcbdc8a46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeda6d607bfc629a95f59e7b538832172"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aeda6d607bfc629a95f59e7b538832172">datastart</a></td></tr>
<tr class="memdesc:aeda6d607bfc629a95f59e7b538832172"><td class="mdescLeft">&#160;</td><td class="mdescRight">helper fields used in locateROI and adjustROI  <a href="#aeda6d607bfc629a95f59e7b538832172">More...</a><br /></td></tr>
<tr class="separator:aeda6d607bfc629a95f59e7b538832172"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39cf614aa52567e9a945cd2609bd767b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a39cf614aa52567e9a945cd2609bd767b">dims</a></td></tr>
<tr class="memdesc:a39cf614aa52567e9a945cd2609bd767b"><td class="mdescLeft">&#160;</td><td class="mdescRight">the matrix dimensionality, &gt;= 2  <a href="#a39cf614aa52567e9a945cd2609bd767b">More...</a><br /></td></tr>
<tr class="separator:a39cf614aa52567e9a945cd2609bd767b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9333f06c84f115fda4cdf3af18c2ad0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#af9333f06c84f115fda4cdf3af18c2ad0">flags</a></td></tr>
<tr class="separator:af9333f06c84f115fda4cdf3af18c2ad0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abed816466c45234254d25bc59c31245e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#abed816466c45234254d25bc59c31245e">rows</a></td></tr>
<tr class="memdesc:abed816466c45234254d25bc59c31245e"><td class="mdescLeft">&#160;</td><td class="mdescRight">the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions  <a href="#abed816466c45234254d25bc59c31245e">More...</a><br /></td></tr>
<tr class="separator:abed816466c45234254d25bc59c31245e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a146f8e8dda07d1365a575ab83d9828d1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../df/d63/structcv_1_1MatSize.html">MatSize</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a146f8e8dda07d1365a575ab83d9828d1">size</a></td></tr>
<tr class="separator:a146f8e8dda07d1365a575ab83d9828d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4b0843e64328eb2a026b5b9ede726fe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d4/d26/structcv_1_1MatStep.html">MatStep</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#ab4b0843e64328eb2a026b5b9ede726fe">step</a></td></tr>
<tr class="separator:ab4b0843e64328eb2a026b5b9ede726fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2742469fe595e1b9036f60d752d08461"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../db/d58/structcv_1_1UMatData.html">UMatData</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d63/classcv_1_1Mat.html#a2742469fe595e1b9036f60d752d08461">u</a></td></tr>
<tr class="memdesc:a2742469fe595e1b9036f60d752d08461"><td class="mdescLeft">&#160;</td><td class="mdescRight">interaction with <a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a>  <a href="#a2742469fe595e1b9036f60d752d08461">More...</a><br /></td></tr>
<tr class="separator:a2742469fe595e1b9036f60d752d08461"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:gaa9eb8c7cba44b791827d0cd685206273"><td class="memTemplParams" colspan="2">template&lt;typename _Tp , typename Functor &gt; </td></tr>
<tr class="memitem:gaa9eb8c7cba44b791827d0cd685206273"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="../../db/de0/group__core__utils.html#gaa9eb8c7cba44b791827d0cd685206273">forEach_impl</a> (const Functor &amp;operation)</td></tr>
<tr class="separator:gaa9eb8c7cba44b791827d0cd685206273"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>n-dimensional dense array class </p>
<p><a class="anchor" id="CVMat_Details"></a> The class <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> represents an n-dimensional dense numerical single-channel or multi-channel array. It can be used to store real or complex-valued vectors and matrices, grayscale or color images, voxel volumes, vector fields, point clouds, tensors, histograms (though, very high-dimensional histograms may be better stored in a <a class="el" href="../../dd/da9/classcv_1_1SparseMat.html" title="The class SparseMat represents multi-dimensional sparse numerical arrays. ">SparseMat</a> ). The data layout of the array <code>M</code> is defined by the array <code>M.step[]</code>, so that the address of element \((i_0,...,i_{M.dims-1})\), where \(0\leq i_k&lt;M.size[k]\), is computed as: </p><p class="formulaDsp">
\[addr(M_{i_0,...,i_{M.dims-1}}) = M.data + M.step[0]*i_0 + M.step[1]*i_1 + ... + M.step[M.dims-1]*i_{M.dims-1}\]
</p>
<p> In case of a 2-dimensional array, the above formula is reduced to: </p><p class="formulaDsp">
\[addr(M_{i,j}) = M.data + M.step[0]*i + M.step[1]*j\]
</p>
<p> Note that <code>M.step[i] &gt;= M.step[i+1]</code> (in fact, <code>M.step[i] &gt;= M.step[i+1]*M.size[i+1]</code> ). This means that 2-dimensional matrices are stored row-by-row, 3-dimensional matrices are stored plane-by-plane, and so on. M.step[M.dims-1] is minimal and always equal to the element size M.elemSize() .</p>
<p>So, the data layout in <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> is compatible with the majority of dense array types from the standard toolkits and SDKs, such as Numpy (ndarray), Win32 (independent device bitmaps), and others, that is, with any array that uses <em>steps</em> (or <em>strides</em>) to compute the position of a pixel. Due to this compatibility, it is possible to make a <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> header for user-allocated data and process it in-place using OpenCV functions.</p>
<p>There are many different ways to create a <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> object. The most popular options are listed below:</p>
<ul>
<li>Use the create(nrows, ncols, type) method or the similar Mat(nrows, ncols, type[, fillValue]) constructor. A new array of the specified size and type is allocated. type has the same meaning as in the cvCreateMat method. For example, CV_8UC1 means a 8-bit single-channel array, CV_32FC2 means a 2-channel (complex) floating-point array, and so on. <div class="fragment"><div class="line"><span class="comment">// make a 7x7 complex matrix filled with 1+3j.</span></div><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> M(7,7,<a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga15d6109d87682bf909122d0ce51c46a6">CV_32FC2</a>,<a class="code" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>(1,3));</div><div class="line"><span class="comment">// and now turn M to a 100x60 15-channel 8-bit matrix.</span></div><div class="line"><span class="comment">// The old content will be deallocated</span></div><div class="line">M.create(100,60,<a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga78c5506f62d99edd7e83aba259250394">CV_8UC</a>(15));</div></div><!-- fragment --> As noted in the introduction to this chapter, <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a55ced2c8d844d683ea9a725c60037ad0" title="Allocates new array data if needed. ">create()</a> allocates only a new array when the shape or type of the current array are different from the specified ones.</li>
<li>Create a multi-dimensional array: <div class="fragment"><div class="line"><span class="comment">// create a 100x100x100 8-bit array</span></div><div class="line"><span class="keywordtype">int</span> sz[] = {100, 100, 100};</div><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> bigCube(3, sz, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga32b18d904ee2b1731a9416a8eef67d06">CV_8U</a>, <a class="code" href="../../d1/da0/classcv_1_1Scalar__.html#ac1509a4b8454fe7fe29db069e13a2e6f">Scalar::all</a>(0));</div></div><!-- fragment --> It passes the number of dimensions =1 to the <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> constructor but the created array will be 2-dimensional with the number of columns set to 1. So, <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a39cf614aa52567e9a945cd2609bd767b" title="the matrix dimensionality, &gt;= 2 ">Mat::dims</a> is always &gt;= 2 (can also be 0 when the array is empty).</li>
<li>Use a copy constructor or assignment operator where there can be an array or expression on the right side (see below). As noted in the introduction, the array assignment is an O(1) operation because it only copies the header and increases the reference counter. The <a class="el" href="../../d3/d63/classcv_1_1Mat.html#adff2ea98da45eae0833e73582dd4a660" title="Creates a full copy of the array and the underlying data. ">Mat::clone()</a> method can be used to get a full (deep) copy of the array when you need it.</li>
<li>Construct a header for a part of another array. It can be a single row, single column, several rows, several columns, rectangular region in the array (called a <em>minor</em> in algebra) or a diagonal. Such operations are also O(1) because the new header references the same data. You can actually modify a part of the array using this feature, for example: <div class="fragment"><div class="line"><span class="comment">// add the 5-th row, multiplied by 3 to the 3rd row</span></div><div class="line">M.row(3) = M.row(3) + M.row(5)*3;</div><div class="line"><span class="comment">// now copy the 7-th column to the 1-st column</span></div><div class="line"><span class="comment">// M.col(1) = M.col(7); // this will not work</span></div><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> M1 = M.col(1);</div><div class="line">M.col(7).copyTo(M1);</div><div class="line"><span class="comment">// create a new 320x240 image</span></div><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> img(<a class="code" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(320,240),<a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>);</div><div class="line"><span class="comment">// select a ROI</span></div><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> roi(img, <a class="code" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a>(10,10,100,100));</div><div class="line"><span class="comment">// fill the ROI with (0,255,0) (which is green in RGB space);</span></div><div class="line"><span class="comment">// the original 320x240 image will be modified</span></div><div class="line">roi = <a class="code" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>(0,255,0);</div></div><!-- fragment --> Due to the additional datastart and dataend members, it is possible to compute a relative sub-array position in the main <em>container</em> array using <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a40b5b3371a9c2a4b2b8ce0c8068d7c96" title="Locates the matrix header within a parent matrix. ">locateROI()</a>: <div class="fragment"><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> A = <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2cf9b9acde7a9852542bbc20ef851ed2">Mat::eye</a>(10, 10, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga4067910fc388075c3ea3aa14393e83b9">CV_32S</a>);</div><div class="line"><span class="comment">// extracts A columns, 1 (inclusive) to 3 (exclusive).</span></div><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> B = A(<a class="code" href="../../da/d35/classcv_1_1Range.html#af5a0207f6f98a69077db8e77898abc0f">Range::all</a>(), Range(1, 3));</div><div class="line"><span class="comment">// extracts B rows, 5 (inclusive) to 9 (exclusive).</span></div><div class="line"><span class="comment">// that is, C \~ A(Range(5, 9), Range(1, 3))</span></div><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> C = B(Range(5, 9), <a class="code" href="../../da/d35/classcv_1_1Range.html#af5a0207f6f98a69077db8e77898abc0f">Range::all</a>());</div><div class="line"><a class="code" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a146f8e8dda07d1365a575ab83d9828d1">size</a>; <a class="code" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> ofs;</div><div class="line">C.locateROI(size, ofs);</div><div class="line"><span class="comment">// size will be (width=10,height=10) and the ofs will be (x=1, y=5)</span></div></div><!-- fragment --> As in case of whole matrices, if you need a deep copy, use the <code><a class="el" href="../../d3/d63/classcv_1_1Mat.html#adff2ea98da45eae0833e73582dd4a660" title="Creates a full copy of the array and the underlying data. ">clone()</a></code> method of the extracted sub-matrices.</li>
<li>Make a header for user-allocated data. It can be useful to do the following:<ol type="1">
<li>Process "foreign" data using OpenCV (for example, when you implement a DirectShow* filter or a processing module for gstreamer, and so on). For example: <div class="fragment"><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> process_video_frame(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* pixels,</div><div class="line">                        <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keywordtype">int</span> <a class="code" href="../../d3/d63/classcv_1_1Mat.html#ab4b0843e64328eb2a026b5b9ede726fe">step</a>)</div><div class="line">{</div><div class="line">    <span class="comment">// wrap input buffer</span></div><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> img(height, width, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>*)pixels, step);</div><div class="line"></div><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> result;</div><div class="line">    <a class="code" href="../../d4/d86/group__imgproc__filter.html#gaabe8c836e97159a9193fb0b11ac52cf1">GaussianBlur</a>(img, result, <a class="code" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(7, 7), 1.5, 1.5);</div><div class="line"></div><div class="line">    <span class="keywordflow">return</span> result;</div><div class="line">}</div></div><!-- fragment --></li>
<li>Quickly initialize small matrices and/or get a super-fast element access. <div class="fragment"><div class="line"><span class="keywordtype">double</span> m[3][3] = {{a, b, c}, {d, e, f}, {g, h, i}};</div><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> M = <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a>(3, 3, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga30a562691cc5987bc88eb7bb7a8faf2b">CV_64F</a>, m).inv();</div></div><!-- fragment --></li>
</ol>
</li>
<li>Use MATLAB-style array initializers, <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a0b57b6a326c8876d944d188a46e0f556" title="Returns a zero array of the specified size and type. ">zeros()</a>, <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a69ae0402d116fc9c71908d8508dc2f09" title="Returns an array of all 1&#39;s of the specified size and type. ">ones()</a>, <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a2cf9b9acde7a9852542bbc20ef851ed2" title="Returns an identity matrix of the specified size and type. ">eye()</a>, for example: <div class="fragment"><div class="line"><span class="comment">// create a double-precision identity matrix and add it to M.</span></div><div class="line">M += <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2cf9b9acde7a9852542bbc20ef851ed2">Mat::eye</a>(M.rows, M.cols, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga30a562691cc5987bc88eb7bb7a8faf2b">CV_64F</a>);</div></div><!-- fragment --></li>
<li>Use a comma-separated initializer: <div class="fragment"><div class="line"><span class="comment">// create a 3x3 double-precision identity matrix</span></div><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> M = (Mat_&lt;double&gt;(3,3) &lt;&lt; 1, 0, 0, 0, 1, 0, 0, 0, 1);</div></div><!-- fragment --> With this approach, you first call a constructor of the <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> class with the proper parameters, and then you just put <code>&lt;&lt; operator</code> followed by comma-separated values that can be constants, variables, expressions, and so on. Also, note the extra parentheses required to avoid compilation errors.</li>
</ul>
<p>Once the array is created, it is automatically managed via a reference-counting mechanism. If the array header is built on top of user-allocated data, you should handle the data by yourself. The array data is deallocated when no one points to it. If you want to release the data pointed by a array header before the array destructor is called, use <a class="el" href="../../d3/d63/classcv_1_1Mat.html#ae48d4913285518e2c21a3457017e716e" title="Decrements the reference counter and deallocates the matrix if needed. ">Mat::release()</a>.</p>
<p>The next important thing to learn about the array class is element access. This manual already described how to compute an address of each array element. Normally, you are not required to use the formula directly in the code. If you know the array element type (which can be retrieved using the method <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5" title="Returns the type of a matrix element. ">Mat::type()</a> ), you can access the element \(M_{ij}\) of a 2-dimensional array as: </p><div class="fragment"><div class="line">M.at&lt;<span class="keywordtype">double</span>&gt;(i,j) += 1.f;</div></div><!-- fragment --><p> assuming that <code>M</code> is a double-precision floating-point array. There are several variants of the method at for a different number of dimensions.</p>
<p>If you need to process a whole row of a 2D array, the most efficient way is to get the pointer to the row first, and then just use the plain C operator [] : </p><div class="fragment"><div class="line"><span class="comment">// compute sum of positive matrix elements</span></div><div class="line"><span class="comment">// (assuming that M is a double-precision matrix)</span></div><div class="line"><span class="keywordtype">double</span> <a class="code" href="../../d2/de8/group__core__array.html#ga716e10a2dd9e228e4d3c95818f106722">sum</a>=0;</div><div class="line"><span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; M.rows; i++)</div><div class="line">{</div><div class="line">    <span class="keyword">const</span> <span class="keywordtype">double</span>* Mi = M.ptr&lt;<span class="keywordtype">double</span>&gt;(i);</div><div class="line">    <span class="keywordflow">for</span>(<span class="keywordtype">int</span> j = 0; j &lt; M.cols; j++)</div><div class="line">        sum += <a class="code" href="../../d7/dcc/group__core__utils__softfloat.html#ga78f988f6cfa6223610298cbd4f86ec66">std::max</a>(Mi[j], 0.);</div><div class="line">}</div></div><!-- fragment --><p> Some operations, like the one above, do not actually depend on the array shape. They just process elements of an array one by one (or elements from multiple arrays that have the same coordinates, for example, array addition). Such operations are called <em>element-wise</em>. It makes sense to check whether all the input/output arrays are continuous, namely, have no gaps at the end of each row. If yes, process them as a long single row: </p><div class="fragment"><div class="line"><span class="comment">// compute the sum of positive matrix elements, optimized variant</span></div><div class="line"><span class="keywordtype">double</span> sum=0;</div><div class="line"><span class="keywordtype">int</span> <a class="code" href="../../d3/d63/classcv_1_1Mat.html#aa3e5a47585c9ef6a0842556739155e3e">cols</a> = M.cols, <a class="code" href="../../d3/d63/classcv_1_1Mat.html#abed816466c45234254d25bc59c31245e">rows</a> = M.rows;</div><div class="line"><span class="keywordflow">if</span>(M.isContinuous())</div><div class="line">{</div><div class="line">    cols *= <a class="code" href="../../d3/d63/classcv_1_1Mat.html#abed816466c45234254d25bc59c31245e">rows</a>;</div><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html#abed816466c45234254d25bc59c31245e">rows</a> = 1;</div><div class="line">}</div><div class="line"><span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="../../d3/d63/classcv_1_1Mat.html#abed816466c45234254d25bc59c31245e">rows</a>; i++)</div><div class="line">{</div><div class="line">    <span class="keyword">const</span> <span class="keywordtype">double</span>* Mi = M.ptr&lt;<span class="keywordtype">double</span>&gt;(i);</div><div class="line">    <span class="keywordflow">for</span>(<span class="keywordtype">int</span> j = 0; j &lt; <a class="code" href="../../d3/d63/classcv_1_1Mat.html#aa3e5a47585c9ef6a0842556739155e3e">cols</a>; j++)</div><div class="line">        sum += <a class="code" href="../../d7/dcc/group__core__utils__softfloat.html#ga78f988f6cfa6223610298cbd4f86ec66">std::max</a>(Mi[j], 0.);</div><div class="line">}</div></div><!-- fragment --><p> In case of the continuous matrix, the outer loop body is executed just once. So, the overhead is smaller, which is especially noticeable in case of small matrices.</p>
<p>Finally, there are STL-style iterators that are smart enough to skip gaps between successive rows: </p><div class="fragment"><div class="line"><span class="comment">// compute sum of positive matrix elements, iterator-based variant</span></div><div class="line"><span class="keywordtype">double</span> sum=0;</div><div class="line">MatConstIterator_&lt;double&gt; it = M.begin&lt;<span class="keywordtype">double</span>&gt;(), it_end = M.end&lt;<span class="keywordtype">double</span>&gt;();</div><div class="line"><span class="keywordflow">for</span>(; it != it_end; ++it)</div><div class="line">    sum += <a class="code" href="../../d7/dcc/group__core__utils__softfloat.html#ga78f988f6cfa6223610298cbd4f86ec66">std::max</a>(*it, 0.);</div></div><!-- fragment --><p> The matrix iterators are random-access iterators, so they can be passed to any STL algorithm, including <a class="el" href="../../d2/de8/group__core__array.html#ga45dd56da289494ce874be2324856898f" title="Sorts each row or each column of a matrix. ">std::sort()</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Matrix Expressions and arithmetic see <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html" title="Matrix expression representation. ">MatExpr</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d1/d9e/fld_lines_8cpp-example.html#_a5">fld_lines.cpp</a>, <a class="el" href="../../d0/d38/modules_2shape_2samples_2shape_example_8cpp-example.html#_a0">modules/shape/samples/shape_example.cpp</a>, <a class="el" href="../../d6/d7f/samples_2cpp_2camshiftdemo_8cpp-example.html#_a0">samples/cpp/camshiftdemo.cpp</a>, <a class="el" href="../../de/d01/samples_2cpp_2connected_components_8cpp-example.html#_a0">samples/cpp/connected_components.cpp</a>, <a class="el" href="../../da/d32/samples_2cpp_2contours2_8cpp-example.html#_a0">samples/cpp/contours2.cpp</a>, <a class="el" href="../../d5/d04/samples_2cpp_2convexhull_8cpp-example.html#_a2">samples/cpp/convexhull.cpp</a>, <a class="el" href="../../d9/d15/samples_2cpp_2cout_mat_8cpp-example.html#_a2">samples/cpp/cout_mat.cpp</a>, <a class="el" href="../../db/d75/samples_2cpp_2create_mask_8cpp-example.html#_a0">samples/cpp/create_mask.cpp</a>, <a class="el" href="../../da/d53/samples_2cpp_2demhist_8cpp-example.html#_a0">samples/cpp/demhist.cpp</a>, <a class="el" href="../../d4/dc6/samples_2cpp_2distrans_8cpp-example.html#_a2">samples/cpp/distrans.cpp</a>, <a class="el" href="../../d6/d56/samples_2cpp_2edge_8cpp-example.html#_a0">samples/cpp/edge.cpp</a>, <a class="el" href="../../d4/d26/samples_2cpp_2facedetect_8cpp-example.html#_a1">samples/cpp/facedetect.cpp</a>, <a class="el" href="../../d2/dcf/samples_2cpp_2falsecolor_8cpp-example.html#_a0">samples/cpp/falsecolor.cpp</a>, <a class="el" href="../../d1/d17/samples_2cpp_2ffilldemo_8cpp-example.html#_a0">samples/cpp/ffilldemo.cpp</a>, <a class="el" href="../../d2/dfd/samples_2cpp_2filestorage_8cpp-example.html#_a11">samples/cpp/filestorage.cpp</a>, <a class="el" href="../../d9/d73/samples_2cpp_2fitellipse_8cpp-example.html#_a2">samples/cpp/fitellipse.cpp</a>, <a class="el" href="../../d8/d34/samples_2cpp_2grabcut_8cpp-example.html#_a4">samples/cpp/grabcut.cpp</a>, <a class="el" href="../../dd/d93/samples_2cpp_2image_alignment_8cpp-example.html#_a0">samples/cpp/image_alignment.cpp</a>, <a class="el" href="../../df/da5/samples_2cpp_2intersectExample_8cpp-example.html#_a6">samples/cpp/intersectExample.cpp</a>, <a class="el" href="../../de/d70/samples_2cpp_2kalman_8cpp-example.html#_a5">samples/cpp/kalman.cpp</a>, <a class="el" href="../../d9/dde/samples_2cpp_2kmeans_8cpp-example.html#_a2">samples/cpp/kmeans.cpp</a>, <a class="el" href="../../d6/ddf/samples_2cpp_2laplace_8cpp-example.html#_a18">samples/cpp/laplace.cpp</a>, <a class="el" href="../../d2/d1d/samples_2cpp_2lkdemo_8cpp-example.html#_a15">samples/cpp/lkdemo.cpp</a>, <a class="el" href="../../df/dee/samples_2cpp_2minarea_8cpp-example.html#_a0">samples/cpp/minarea.cpp</a>, <a class="el" href="../../d3/db0/samples_2cpp_2pca_8cpp-example.html#_a4">samples/cpp/pca.cpp</a>, <a class="el" href="../../df/d54/samples_2cpp_2peopledetect_8cpp-example.html#_a24">samples/cpp/peopledetect.cpp</a>, <a class="el" href="../../d4/d35/samples_2cpp_2polar_transforms_8cpp-example.html#_a1">samples/cpp/polar_transforms.cpp</a>, <a class="el" href="../../d5/de8/samples_2cpp_2segment_objects_8cpp-example.html#_a0">samples/cpp/segment_objects.cpp</a>, <a class="el" href="../../db/d00/samples_2cpp_2squares_8cpp-example.html#_a5">samples/cpp/squares.cpp</a>, <a class="el" href="../../db/db4/samples_2cpp_2stitching_8cpp-example.html#_a0">samples/cpp/stitching.cpp</a>, <a class="el" href="../../d9/dd8/samples_2cpp_2stitching_detailed_8cpp-example.html#_a4">samples/cpp/stitching_detailed.cpp</a>, <a class="el" href="../../d0/df8/samples_2cpp_2train_HOG_8cpp-example.html#_a0">samples/cpp/train_HOG.cpp</a>, <a class="el" href="../../de/d45/samples_2cpp_2tutorial_code_2features2D_2Homography_2decompose_homography_8cpp-example.html#_a6">samples/cpp/tutorial_code/features2D/Homography/decompose_homography.cpp</a>, <a class="el" href="../../d9/d47/samples_2cpp_2tutorial_code_2features2D_2Homography_2homography_from_camera_displacement_8cpp-example.html#_a6">samples/cpp/tutorial_code/features2D/Homography/homography_from_camera_displacement.cpp</a>, <a class="el" href="../../d0/d92/samples_2cpp_2tutorial_code_2features2D_2Homography_2pose_from_homography_8cpp-example.html#_a6">samples/cpp/tutorial_code/features2D/Homography/pose_from_homography.cpp</a>, <a class="el" href="../../dc/dbc/samples_2cpp_2tutorial_code_2HighGUI_2AddingImagesTrackbar_8cpp-example.html#_a0">samples/cpp/tutorial_code/HighGUI/AddingImagesTrackbar.cpp</a>, <a class="el" href="../../d8/ded/samples_2cpp_2tutorial_code_2Histograms_Matching_2MatchTemplate_Demo_8cpp-example.html#_a0">samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp</a>, <a class="el" href="../../d2/dda/samples_2cpp_2tutorial_code_2ImgProc_2basic_drawing_2Drawing_1_8cpp-example.html#_a0">samples/cpp/tutorial_code/ImgProc/basic_drawing/Drawing_1.cpp</a>, <a class="el" href="../../de/d06/samples_2cpp_2tutorial_code_2ImgProc_2basic_drawing_2Drawing_2_8cpp-example.html#_a2">samples/cpp/tutorial_code/ImgProc/basic_drawing/Drawing_2.cpp</a>, <a class="el" href="../../df/d5e/samples_2cpp_2tutorial_code_2ImgProc_2Morphology_1_8cpp-example.html#_a0">samples/cpp/tutorial_code/ImgProc/Morphology_1.cpp</a>, <a class="el" href="../../da/d34/samples_2cpp_2tutorial_code_2ImgProc_2Morphology_2_8cpp-example.html#_a0">samples/cpp/tutorial_code/ImgProc/Morphology_2.cpp</a>, <a class="el" href="../../d3/d08/samples_2cpp_2tutorial_code_2ImgProc_2Pyramids_2Pyramids_8cpp-example.html#_a0">samples/cpp/tutorial_code/ImgProc/Pyramids/Pyramids.cpp</a>, <a class="el" href="../../d3/d8f/samples_2cpp_2tutorial_code_2ImgProc_2Smoothing_2Smoothing_8cpp-example.html#_a0">samples/cpp/tutorial_code/ImgProc/Smoothing/Smoothing.cpp</a>, <a class="el" href="../../d6/d14/samples_2cpp_2tutorial_code_2ImgTrans_2copyMakeBorder_demo_8cpp-example.html#_a0">samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp</a>, <a class="el" href="../../d1/de6/samples_2cpp_2tutorial_code_2ImgTrans_2houghcircles_8cpp-example.html#_a0">samples/cpp/tutorial_code/ImgTrans/houghcircles.cpp</a>, <a class="el" href="../../d5/df9/samples_2cpp_2tutorial_code_2ImgTrans_2houghlines_8cpp-example.html#_a0">samples/cpp/tutorial_code/ImgTrans/houghlines.cpp</a>, <a class="el" href="../../d3/d94/samples_2cpp_2tutorial_code_2ImgTrans_2Sobel_Demo_8cpp-example.html#_a2">samples/cpp/tutorial_code/ImgTrans/Sobel_Demo.cpp</a>, <a class="el" href="../../da/d94/samples_2cpp_2tutorial_code_2ml_2introduction_to_pca_2introduction_to_pca_8cpp-example.html#_a1">samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp</a>, <a class="el" href="../../de/dd9/samples_2cpp_2tutorial_code_2photo_2non_photorealistic_rendering_2npr_demo_8cpp-example.html#_a1">samples/cpp/tutorial_code/photo/non_photorealistic_rendering/npr_demo.cpp</a>, <a class="el" href="../../dc/d23/samples_2cpp_2tutorial_code_2photo_2seamless_cloning_2cloning_demo_8cpp-example.html#_a0">samples/cpp/tutorial_code/photo/seamless_cloning/cloning_demo.cpp</a>, <a class="el" href="../../d3/d9c/samples_2cpp_2tutorial_code_2videoio_2video-write_2video-write_8cpp-example.html#_a14">samples/cpp/tutorial_code/videoio/video-write/video-write.cpp</a>, <a class="el" href="../../df/d94/samples_2cpp_2videowriter_basic_8cpp-example.html#_a0">samples/cpp/videowriter_basic.cpp</a>, <a class="el" href="../../de/dd4/samples_2cpp_2warpPerspective_demo_8cpp-example.html#_a1">samples/cpp/warpPerspective_demo.cpp</a>, <a class="el" href="../../d4/d40/samples_2cpp_2watershed_8cpp-example.html#_a0">samples/cpp/watershed.cpp</a>, <a class="el" href="../../d9/d8d/samples_2dnn_2classification_8cpp-example.html#_a21">samples/dnn/classification.cpp</a>, <a class="el" href="../../d6/d39/samples_2dnn_2colorization_8cpp-example.html#_a3">samples/dnn/colorization.cpp</a>, <a class="el" href="../../d4/db9/samples_2dnn_2object_detection_8cpp-example.html#_a0">samples/dnn/object_detection.cpp</a>, <a class="el" href="../../d7/d4f/samples_2dnn_2openpose_8cpp-example.html#_a7">samples/dnn/openpose.cpp</a>, <a class="el" href="../../d4/d88/samples_2dnn_2segmentation_8cpp-example.html#_a0">samples/dnn/segmentation.cpp</a>, <a class="el" href="../../db/da4/samples_2dnn_2text_detection_8cpp-example.html#_a0">samples/dnn/text_detection.cpp</a>, and <a class="el" href="../../de/dc0/samples_2tapi_2squares_8cpp-example.html#_a26">samples/tapi/squares.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="aa6207c8cf9a3e442f153dc0241aea600"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6207c8cf9a3e442f153dc0241aea600">&#9670;&nbsp;</a></span>anonymous enum</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="aa6207c8cf9a3e442f153dc0241aea600a2082a2faa4b65dedcc5b84433c97f817"></a>MAGIC_VAL&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="aa6207c8cf9a3e442f153dc0241aea600a1c147538fd896f4f9abce9eaea9727e3"></a>AUTO_STEP&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="aa6207c8cf9a3e442f153dc0241aea600a3a50403178ba15a9617f5ff341418cf9"></a>CONTINUOUS_FLAG&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="aa6207c8cf9a3e442f153dc0241aea600a1db725f4a7efd16a41581b4fc54e7aad"></a>SUBMATRIX_FLAG&#160;</td><td class="fielddoc"></td></tr>
</table>

</div>
</div>
<a id="ada7179f86462918c8eee640292962739"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada7179f86462918c8eee640292962739">&#9670;&nbsp;</a></span>anonymous enum</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ada7179f86462918c8eee640292962739a1b2031796886cd80edd90640bc17fb50"></a>MAGIC_MASK&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ada7179f86462918c8eee640292962739a03b3e6a1defa1189b67c9f3d70b7c448"></a>TYPE_MASK&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="ada7179f86462918c8eee640292962739a1454580da17d20c8ec5917170dc3da3a"></a>DEPTH_MASK&#160;</td><td class="fielddoc"></td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a2c4229732da267f1fe385458af3896d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c4229732da267f1fe385458af3896d8">&#9670;&nbsp;</a></span>Mat() <span class="overload">[1/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>These are various constructors that form a matrix. As noted in the AutomaticAllocation, often the default constructor is enough, and the proper matrix will be allocated by an OpenCV function. The constructed matrix can further be assigned to another matrix or matrix expression or can be allocated with <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a55ced2c8d844d683ea9a725c60037ad0" title="Allocates new array data if needed. ">Mat::create</a> . In the former case, the old content is de-referenced. </p>

</div>
</div>
<a id="a2ec3402f7d165ca34c7fd6e8498a62ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ec3402f7d165ca34c7fd6e8498a62ca">&#9670;&nbsp;</a></span>Mat() <span class="overload">[2/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cols</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rows</td><td>Number of rows in a 2D array. </td></tr>
    <tr><td class="paramname">cols</td><td>Number of columns in a 2D array. </td></tr>
    <tr><td class="paramname">type</td><td>Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga78c5506f62d99edd7e83aba259250394">CV_8UC(n)</a>, ..., <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4213eb262159eb6da4edf8c9255e8244">CV_64FC(n)</a> to create multi-channel (up to CV_CN_MAX channels) matrices. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a75a97b1e4e55f380c172af58048a7cde"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75a97b1e4e55f380c172af58048a7cde">&#9670;&nbsp;</a></span>Mat() <span class="overload">[3/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>2D array size: Size(cols, rows) . In the <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size()</a> constructor, the number of rows and the number of columns go in the reverse order. </td></tr>
    <tr><td class="paramname">type</td><td>Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga78c5506f62d99edd7e83aba259250394">CV_8UC(n)</a>, ..., <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4213eb262159eb6da4edf8c9255e8244">CV_64FC(n)</a> to create multi-channel (up to CV_CN_MAX channels) matrices. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a3620c370690b5ca4d40c767be6fb4ceb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3620c370690b5ca4d40c767be6fb4ceb">&#9670;&nbsp;</a></span>Mat() <span class="overload">[4/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cols</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;&#160;</td>
          <td class="paramname"><em>s</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rows</td><td>Number of rows in a 2D array. </td></tr>
    <tr><td class="paramname">cols</td><td>Number of columns in a 2D array. </td></tr>
    <tr><td class="paramname">type</td><td>Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga78c5506f62d99edd7e83aba259250394">CV_8UC(n)</a>, ..., <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4213eb262159eb6da4edf8c9255e8244">CV_64FC(n)</a> to create multi-channel (up to CV_CN_MAX channels) matrices. </td></tr>
    <tr><td class="paramname">s</td><td>An optional value to initialize each matrix element with. To set all the matrix elements to the particular value after the construction, use the assignment operator <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa5c947f7e449a4d856a4f3a87fcebd50" title="Sets all or some of the array elements to the specified value. ">Mat::operator=(const Scalar&amp; value)</a> . </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a286371a6196eaaaf0b86e158590460b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a286371a6196eaaaf0b86e158590460b7">&#9670;&nbsp;</a></span>Mat() <span class="overload">[5/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;&#160;</td>
          <td class="paramname"><em>s</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>2D array size: Size(cols, rows) . In the <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size()</a> constructor, the number of rows and the number of columns go in the reverse order. </td></tr>
    <tr><td class="paramname">type</td><td>Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga78c5506f62d99edd7e83aba259250394">CV_8UC(n)</a>, ..., <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4213eb262159eb6da4edf8c9255e8244">CV_64FC(n)</a> to create multi-channel (up to CV_CN_MAX channels) matrices. </td></tr>
    <tr><td class="paramname">s</td><td>An optional value to initialize each matrix element with. To set all the matrix elements to the particular value after the construction, use the assignment operator <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa5c947f7e449a4d856a4f3a87fcebd50" title="Sets all or some of the array elements to the specified value. ">Mat::operator=(const Scalar&amp; value)</a> . </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a156df5a1326dd5c30b187b0e721a5f57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a156df5a1326dd5c30b187b0e721a5f57">&#9670;&nbsp;</a></span>Mat() <span class="overload">[6/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ndims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>sizes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ndims</td><td>Array dimensionality. </td></tr>
    <tr><td class="paramname">sizes</td><td>Array of integers specifying an n-dimensional array shape. </td></tr>
    <tr><td class="paramname">type</td><td>Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga78c5506f62d99edd7e83aba259250394">CV_8UC(n)</a>, ..., <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4213eb262159eb6da4edf8c9255e8244">CV_64FC(n)</a> to create multi-channel (up to CV_CN_MAX channels) matrices. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a6adc4d64db5379bcbb713e71c9292f6e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6adc4d64db5379bcbb713e71c9292f6e">&#9670;&nbsp;</a></span>Mat() <span class="overload">[7/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; int &gt; &amp;&#160;</td>
          <td class="paramname"><em>sizes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sizes</td><td>Array of integers specifying an n-dimensional array shape. </td></tr>
    <tr><td class="paramname">type</td><td>Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga78c5506f62d99edd7e83aba259250394">CV_8UC(n)</a>, ..., <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4213eb262159eb6da4edf8c9255e8244">CV_64FC(n)</a> to create multi-channel (up to CV_CN_MAX channels) matrices. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="afbf34be80b7443123b2a032a67c3c4e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afbf34be80b7443123b2a032a67c3c4e3">&#9670;&nbsp;</a></span>Mat() <span class="overload">[8/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ndims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>sizes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;&#160;</td>
          <td class="paramname"><em>s</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ndims</td><td>Array dimensionality. </td></tr>
    <tr><td class="paramname">sizes</td><td>Array of integers specifying an n-dimensional array shape. </td></tr>
    <tr><td class="paramname">type</td><td>Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga78c5506f62d99edd7e83aba259250394">CV_8UC(n)</a>, ..., <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4213eb262159eb6da4edf8c9255e8244">CV_64FC(n)</a> to create multi-channel (up to CV_CN_MAX channels) matrices. </td></tr>
    <tr><td class="paramname">s</td><td>An optional value to initialize each matrix element with. To set all the matrix elements to the particular value after the construction, use the assignment operator <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa5c947f7e449a4d856a4f3a87fcebd50" title="Sets all or some of the array elements to the specified value. ">Mat::operator=(const Scalar&amp; value)</a> . </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad20a78b5501fc39543a240142a40e234"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad20a78b5501fc39543a240142a40e234">&#9670;&nbsp;</a></span>Mat() <span class="overload">[9/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; int &gt; &amp;&#160;</td>
          <td class="paramname"><em>sizes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;&#160;</td>
          <td class="paramname"><em>s</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sizes</td><td>Array of integers specifying an n-dimensional array shape. </td></tr>
    <tr><td class="paramname">type</td><td>Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga78c5506f62d99edd7e83aba259250394">CV_8UC(n)</a>, ..., <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4213eb262159eb6da4edf8c9255e8244">CV_64FC(n)</a> to create multi-channel (up to CV_CN_MAX channels) matrices. </td></tr>
    <tr><td class="paramname">s</td><td>An optional value to initialize each matrix element with. To set all the matrix elements to the particular value after the construction, use the assignment operator <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa5c947f7e449a4d856a4f3a87fcebd50" title="Sets all or some of the array elements to the specified value. ">Mat::operator=(const Scalar&amp; value)</a> . </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a294eaf8a95d2f9c7be19ff594d06278e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a294eaf8a95d2f9c7be19ff594d06278e">&#9670;&nbsp;</a></span>Mat() <span class="overload">[10/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied by these constructors. Instead, the header pointing to m data or its sub-array is constructed and associated with it. The reference counter, if any, is incremented. So, when you modify the matrix formed using such a constructor, you also modify the corresponding elements of m . If you want to have an independent copy of the sub-array, use <a class="el" href="../../d3/d63/classcv_1_1Mat.html#adff2ea98da45eae0833e73582dd4a660" title="Creates a full copy of the array and the underlying data. ">Mat::clone()</a> . </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a51615ebf17a64c968df0bf49b4de6a3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a51615ebf17a64c968df0bf49b4de6a3a">&#9670;&nbsp;</a></span>Mat() <span class="overload">[11/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cols</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>step</em> = <code><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa6207c8cf9a3e442f153dc0241aea600a1c147538fd896f4f9abce9eaea9727e3">AUTO_STEP</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rows</td><td>Number of rows in a 2D array. </td></tr>
    <tr><td class="paramname">cols</td><td>Number of columns in a 2D array. </td></tr>
    <tr><td class="paramname">type</td><td>Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga78c5506f62d99edd7e83aba259250394">CV_8UC(n)</a>, ..., <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4213eb262159eb6da4edf8c9255e8244">CV_64FC(n)</a> to create multi-channel (up to CV_CN_MAX channels) matrices. </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to the user data. Matrix constructors that take data and step parameters do not allocate matrix data. Instead, they just initialize the matrix header that points to the specified data, which means that no data is copied. This operation is very efficient and can be used to process external data using OpenCV functions. The external data is not automatically deallocated, so you should take care of it. </td></tr>
    <tr><td class="paramname">step</td><td>Number of bytes each matrix row occupies. The value should include the padding bytes at the end of each row, if any. If the parameter is missing (set to AUTO_STEP ), no padding is assumed and the actual step is calculated as cols*elemSize(). See <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aba7a5ef00b22b70668fba575005dfe55" title="Returns the matrix element size in bytes. ">Mat::elemSize</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9fa74fb14362d87cb183453d2441948f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9fa74fb14362d87cb183453d2441948f">&#9670;&nbsp;</a></span>Mat() <span class="overload">[12/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>step</em> = <code><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa6207c8cf9a3e442f153dc0241aea600a1c147538fd896f4f9abce9eaea9727e3">AUTO_STEP</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>2D array size: Size(cols, rows) . In the <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size()</a> constructor, the number of rows and the number of columns go in the reverse order. </td></tr>
    <tr><td class="paramname">type</td><td>Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga78c5506f62d99edd7e83aba259250394">CV_8UC(n)</a>, ..., <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4213eb262159eb6da4edf8c9255e8244">CV_64FC(n)</a> to create multi-channel (up to CV_CN_MAX channels) matrices. </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to the user data. Matrix constructors that take data and step parameters do not allocate matrix data. Instead, they just initialize the matrix header that points to the specified data, which means that no data is copied. This operation is very efficient and can be used to process external data using OpenCV functions. The external data is not automatically deallocated, so you should take care of it. </td></tr>
    <tr><td class="paramname">step</td><td>Number of bytes each matrix row occupies. The value should include the padding bytes at the end of each row, if any. If the parameter is missing (set to AUTO_STEP ), no padding is assumed and the actual step is calculated as cols*elemSize(). See <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aba7a5ef00b22b70668fba575005dfe55" title="Returns the matrix element size in bytes. ">Mat::elemSize</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a5fafc033e089143062fd31015b5d0f40"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5fafc033e089143062fd31015b5d0f40">&#9670;&nbsp;</a></span>Mat() <span class="overload">[13/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ndims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>sizes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const size_t *&#160;</td>
          <td class="paramname"><em>steps</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ndims</td><td>Array dimensionality. </td></tr>
    <tr><td class="paramname">sizes</td><td>Array of integers specifying an n-dimensional array shape. </td></tr>
    <tr><td class="paramname">type</td><td>Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga78c5506f62d99edd7e83aba259250394">CV_8UC(n)</a>, ..., <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4213eb262159eb6da4edf8c9255e8244">CV_64FC(n)</a> to create multi-channel (up to CV_CN_MAX channels) matrices. </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to the user data. Matrix constructors that take data and step parameters do not allocate matrix data. Instead, they just initialize the matrix header that points to the specified data, which means that no data is copied. This operation is very efficient and can be used to process external data using OpenCV functions. The external data is not automatically deallocated, so you should take care of it. </td></tr>
    <tr><td class="paramname">steps</td><td>Array of ndims-1 steps in case of a multi-dimensional array (the last step is always set to the element size). If not specified, the matrix is assumed to be continuous. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a922de793eabcec705b3579c5f95a643e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a922de793eabcec705b3579c5f95a643e">&#9670;&nbsp;</a></span>Mat() <span class="overload">[14/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; int &gt; &amp;&#160;</td>
          <td class="paramname"><em>sizes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const size_t *&#160;</td>
          <td class="paramname"><em>steps</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sizes</td><td>Array of integers specifying an n-dimensional array shape. </td></tr>
    <tr><td class="paramname">type</td><td>Array type. Use CV_8UC1, ..., CV_64FC4 to create 1-4 channel matrices, or <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga78c5506f62d99edd7e83aba259250394">CV_8UC(n)</a>, ..., <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4213eb262159eb6da4edf8c9255e8244">CV_64FC(n)</a> to create multi-channel (up to CV_CN_MAX channels) matrices. </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to the user data. Matrix constructors that take data and step parameters do not allocate matrix data. Instead, they just initialize the matrix header that points to the specified data, which means that no data is copied. This operation is very efficient and can be used to process external data using OpenCV functions. The external data is not automatically deallocated, so you should take care of it. </td></tr>
    <tr><td class="paramname">steps</td><td>Array of ndims-1 steps in case of a multi-dimensional array (the last step is always set to the element size). If not specified, the matrix is assumed to be continuous. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a92a3e9e5911a2eb0cf0950a0a9670c76"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92a3e9e5911a2eb0cf0950a0a9670c76">&#9670;&nbsp;</a></span>Mat() <span class="overload">[15/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> &amp;&#160;</td>
          <td class="paramname"><em>rowRange</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> &amp;&#160;</td>
          <td class="paramname"><em>colRange</em> = <code><a class="el" href="../../da/d35/classcv_1_1Range.html#af5a0207f6f98a69077db8e77898abc0f">Range::all</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied by these constructors. Instead, the header pointing to m data or its sub-array is constructed and associated with it. The reference counter, if any, is incremented. So, when you modify the matrix formed using such a constructor, you also modify the corresponding elements of m . If you want to have an independent copy of the sub-array, use <a class="el" href="../../d3/d63/classcv_1_1Mat.html#adff2ea98da45eae0833e73582dd4a660" title="Creates a full copy of the array and the underlying data. ">Mat::clone()</a> . </td></tr>
    <tr><td class="paramname">rowRange</td><td><a class="el" href="../../da/d35/classcv_1_1Range.html" title="Template class specifying a continuous subsequence (slice) of a sequence. ">Range</a> of the m rows to take. As usual, the range start is inclusive and the range end is exclusive. Use <a class="el" href="../../da/d35/classcv_1_1Range.html#af5a0207f6f98a69077db8e77898abc0f">Range::all()</a> to take all the rows. </td></tr>
    <tr><td class="paramname">colRange</td><td><a class="el" href="../../da/d35/classcv_1_1Range.html" title="Template class specifying a continuous subsequence (slice) of a sequence. ">Range</a> of the m columns to take. Use <a class="el" href="../../da/d35/classcv_1_1Range.html#af5a0207f6f98a69077db8e77898abc0f">Range::all()</a> to take all the columns. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa7ec97373406215f2d4bc72cc1d27036"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa7ec97373406215f2d4bc72cc1d27036">&#9670;&nbsp;</a></span>Mat() <span class="overload">[16/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> &amp;&#160;</td>
          <td class="paramname"><em>roi</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied by these constructors. Instead, the header pointing to m data or its sub-array is constructed and associated with it. The reference counter, if any, is incremented. So, when you modify the matrix formed using such a constructor, you also modify the corresponding elements of m . If you want to have an independent copy of the sub-array, use <a class="el" href="../../d3/d63/classcv_1_1Mat.html#adff2ea98da45eae0833e73582dd4a660" title="Creates a full copy of the array and the underlying data. ">Mat::clone()</a> . </td></tr>
    <tr><td class="paramname">roi</td><td>Region of interest. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="afde22a742fc73c0a150a9002310ac2eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afde22a742fc73c0a150a9002310ac2eb">&#9670;&nbsp;</a></span>Mat() <span class="overload">[17/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> *&#160;</td>
          <td class="paramname"><em>ranges</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied by these constructors. Instead, the header pointing to m data or its sub-array is constructed and associated with it. The reference counter, if any, is incremented. So, when you modify the matrix formed using such a constructor, you also modify the corresponding elements of m . If you want to have an independent copy of the sub-array, use <a class="el" href="../../d3/d63/classcv_1_1Mat.html#adff2ea98da45eae0833e73582dd4a660" title="Creates a full copy of the array and the underlying data. ">Mat::clone()</a> . </td></tr>
    <tr><td class="paramname">ranges</td><td>Array of selected ranges of m along each dimensionality. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa6e903a6c762478692791a33d233019b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6e903a6c762478692791a33d233019b">&#9670;&nbsp;</a></span>Mat() <span class="overload">[18/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>ranges</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>Array that (as a whole or partly) is assigned to the constructed matrix. No data is copied by these constructors. Instead, the header pointing to m data or its sub-array is constructed and associated with it. The reference counter, if any, is incremented. So, when you modify the matrix formed using such a constructor, you also modify the corresponding elements of m . If you want to have an independent copy of the sub-array, use <a class="el" href="../../d3/d63/classcv_1_1Mat.html#adff2ea98da45eae0833e73582dd4a660" title="Creates a full copy of the array and the underlying data. ">Mat::clone()</a> . </td></tr>
    <tr><td class="paramname">ranges</td><td>Array of selected ranges of m along each dimensionality. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a23b182c4ffd46abe38f460c1480ae887"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23b182c4ffd46abe38f460c1480ae887">&#9670;&nbsp;</a></span>Mat() <span class="overload">[19/29]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; _Tp &gt; &amp;&#160;</td>
          <td class="paramname"><em>vec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>copyData</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vec</td><td>STL vector whose elements form the matrix. The matrix has a single column and the number of rows equal to the number of vector elements. Type of the matrix matches the type of vector elements. The constructor can handle arbitrary types, for which there is a properly declared <a class="el" href="../../d0/d3a/classcv_1_1DataType.html" title="Template &quot;trait&quot; class for OpenCV primitive data types. ">DataType</a> . This means that the vector elements must be primitive numbers or uni-type numerical tuples of numbers. Mixed-type structures are not supported. The corresponding constructor is explicit. Since STL vectors are not automatically converted to <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> instances, you should write Mat(vec) explicitly. Unless you copy the data into the matrix ( copyData=true ), no new elements will be added to the vector because it can potentially yield vector data reallocation, and, thus, the matrix data pointer will be invalid. </td></tr>
    <tr><td class="paramname">copyData</td><td>Flag to specify whether the underlying data of the STL vector should be copied to (true) or shared with (false) the newly constructed matrix. When the data is copied, the allocated buffer is managed using <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> reference counting mechanism. While the data is shared, the reference counter is NULL, and you should not deallocate the data until the matrix is not destructed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="afccd5d581d7dc205925debf83ea4c7be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afccd5d581d7dc205925debf83ea4c7be">&#9670;&nbsp;</a></span>Mat() <span class="overload">[20/29]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp , typename  = typename std::enable_if&lt;std::is_arithmetic&lt;_Tp&gt;::value&gt;::type&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const std::initializer_list&lt; _Tp &gt;&#160;</td>
          <td class="paramname"><em>list</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a174d591e68a4876f7164aefb1f3551d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a174d591e68a4876f7164aefb1f3551d5">&#9670;&nbsp;</a></span>Mat() <span class="overload">[21/29]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const std::initializer_list&lt; int &gt;&#160;</td>
          <td class="paramname"><em>sizes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::initializer_list&lt; _Tp &gt;&#160;</td>
          <td class="paramname"><em>list</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="af831f6ce5e9ff546682e8155b5c835b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af831f6ce5e9ff546682e8155b5c835b1">&#9670;&nbsp;</a></span>Mat() <span class="overload">[22/29]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp , size_t _Nm&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const std::array&lt; _Tp, _Nm &gt; &amp;&#160;</td>
          <td class="paramname"><em>arr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>copyData</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a507e01fb48b34a3e5c45f9f5b00725e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a507e01fb48b34a3e5c45f9f5b00725e8">&#9670;&nbsp;</a></span>Mat() <span class="overload">[23/29]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp , int n&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d6/dcf/classcv_1_1Vec.html">Vec</a>&lt; _Tp, n &gt; &amp;&#160;</td>
          <td class="paramname"><em>vec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>copyData</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a37068a8d9acc7cc5af817eb82b2aa83b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a37068a8d9acc7cc5af817eb82b2aa83b">&#9670;&nbsp;</a></span>Mat() <span class="overload">[24/29]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp , int m, int n&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../de/de1/classcv_1_1Matx.html">Matx</a>&lt; _Tp, m, n &gt; &amp;&#160;</td>
          <td class="paramname"><em>mtx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>copyData</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a224477889ddc7424aaab1b76e7682ea2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a224477889ddc7424aaab1b76e7682ea2">&#9670;&nbsp;</a></span>Mat() <span class="overload">[25/29]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../db/d4e/classcv_1_1Point__.html">Point_</a>&lt; _Tp &gt; &amp;&#160;</td>
          <td class="paramname"><em>pt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>copyData</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a7d72610ed5aed9117eb7933a97670309"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d72610ed5aed9117eb7933a97670309">&#9670;&nbsp;</a></span>Mat() <span class="overload">[26/29]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/d6c/classcv_1_1Point3__.html">Point3_</a>&lt; _Tp &gt; &amp;&#160;</td>
          <td class="paramname"><em>pt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>copyData</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a23957ae2fed348c67952c0d69c873972"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23957ae2fed348c67952c0d69c873972">&#9670;&nbsp;</a></span>Mat() <span class="overload">[27/29]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d6/d9e/classcv_1_1MatCommaInitializer__.html">MatCommaInitializer_</a>&lt; _Tp &gt; &amp;&#160;</td>
          <td class="paramname"><em>commaInitializer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="aa82eca82664985c81c7912b04549370d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa82eca82664985c81c7912b04549370d">&#9670;&nbsp;</a></span>Mat() <span class="overload">[28/29]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d0/d60/classcv_1_1cuda_1_1GpuMat.html">cuda::GpuMat</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>download data from GpuMat </p>

</div>
</div>
<a id="a1b2ae166171f6a7306cf09ff67a2153f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b2ae166171f6a7306cf09ff67a2153f">&#9670;&nbsp;</a></span>~Mat()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::~Mat </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>destructor - calls <a class="el" href="../../d3/d63/classcv_1_1Mat.html#ae48d4913285518e2c21a3457017e716e" title="Decrements the reference counter and deallocates the matrix if needed. ">release()</a> </p>

</div>
</div>
<a id="adcaeb226bafeff8a1b262f57f6ffbcc4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adcaeb226bafeff8a1b262f57f6ffbcc4">&#9670;&nbsp;</a></span>Mat() <span class="overload">[29/29]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::Mat </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&amp;&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a9d3794250e3dc39714f980b4d0d45864"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d3794250e3dc39714f980b4d0d45864">&#9670;&nbsp;</a></span>addref()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::addref </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Increments the reference counter. </p>
<p>The method increments the reference counter associated with the matrix data. If the matrix header points to an external data set (see <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat::Mat</a> ), the reference counter is NULL, and the method has no effect in this case. Normally, to avoid memory leaks, the method should not be called explicitly. It is called implicitly by the matrix assignment operator. The reference counter increment is an atomic operation on the platforms that support it. Thus, it is safe to operate on the same matrices asynchronously in different threads. </p>

</div>
</div>
<a id="a2fece3507ee7e1284deee6da99e76b9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2fece3507ee7e1284deee6da99e76b9b">&#9670;&nbsp;</a></span>adjustROI()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&amp; cv::Mat::adjustROI </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dtop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dbottom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dleft</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dright</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adjusts a submatrix size and position within the parent matrix. </p>
<p>The method is complimentary to <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a40b5b3371a9c2a4b2b8ce0c8068d7c96" title="Locates the matrix header within a parent matrix. ">Mat::locateROI</a> . The typical use of these functions is to determine the submatrix position within the parent matrix and then shift the position somehow. Typically, it can be required for filtering operations when pixels outside of the ROI should be taken into account. When all the method parameters are positive, the ROI needs to grow in all directions by the specified amount, for example: </p><div class="fragment"><div class="line">A.adjustROI(2, 2, 2, 2);</div></div><!-- fragment --><p> In this example, the matrix size is increased by 4 elements in each direction. The matrix is shifted by 2 elements to the left and 2 elements up, which brings in all the necessary pixels for the filtering with the 5x5 kernel.</p>
<p>adjustROI forces the adjusted ROI to be inside of the parent matrix that is boundaries of the adjusted ROI are constrained by boundaries of the parent matrix. For example, if the submatrix A is located in the first row of a parent matrix and you called A.adjustROI(2, 2, 2, 2) then A will not be increased in the upward direction.</p>
<p>The function is used internally by the OpenCV filtering functions, like filter2D , morphological operations, and so on. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dtop</td><td>Shift of the top submatrix boundary upwards. </td></tr>
    <tr><td class="paramname">dbottom</td><td>Shift of the bottom submatrix boundary downwards. </td></tr>
    <tr><td class="paramname">dleft</td><td>Shift of the left submatrix boundary to the left. </td></tr>
    <tr><td class="paramname">dright</td><td>Shift of the right submatrix boundary to the right. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d2/de8/group__core__array.html#ga2ac1049c2c3dd25c2b41bffe17658a36" title="Forms a border around an image. ">copyMakeBorder</a> </dd></dl>

</div>
</div>
<a id="aa8b3b4d7b9876a4726740b75daa98ddb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8b3b4d7b9876a4726740b75daa98ddb">&#9670;&nbsp;</a></span>assignTo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::assignTo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Provides a functional form of convertTo. </p>
<p>This is an internally used method called by the <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html#MatrixExpressions">MatrixExpressions</a> engine. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>Destination array. </td></tr>
    <tr><td class="paramname">type</td><td>Desired destination array depth (or -1 if it should be the same as the source type). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa5d20fc86d41d59e4d71ae93daee9726"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5d20fc86d41d59e4d71ae93daee9726">&#9670;&nbsp;</a></span>at() <span class="overload">[1/12]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">_Tp&amp; cv::Mat::at </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i0</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a reference to the specified array element. </p>
<p>The template methods return a reference to the specified array element. For the sake of higher performance, the index range checks are only performed in the Debug configuration.</p>
<p>Note that the variants with a single index (i) can be used to access elements of single-row or single-column 2-dimensional arrays. That is, if, for example, A is a 1 x N floating-point matrix and B is an M x 1 integer matrix, you can simply write <code>A.at&lt;float&gt;(k+4)</code> and <code>B.at&lt;int&gt;(2*i+1)</code> instead of <code>A.at&lt;float&gt;(0,k+4)</code> and <code>B.at&lt;int&gt;(2*i+1,0)</code>, respectively.</p>
<p>The example below initializes a Hilbert matrix: </p><div class="fragment"><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> H(100, 100, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga30a562691cc5987bc88eb7bb7a8faf2b">CV_64F</a>);</div><div class="line"><span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; H.rows; i++)</div><div class="line">    <span class="keywordflow">for</span>(<span class="keywordtype">int</span> j = 0; j &lt; H.cols; j++)</div><div class="line">        H.at&lt;<span class="keywordtype">double</span>&gt;(i,j)=1./(i+j+1);</div></div><!-- fragment --><p>Keep in mind that the size identifier used in the at operator cannot be chosen at random. It depends on the image from which you are trying to retrieve the data. The table below gives a better insight in this:</p><ul>
<li>If matrix is of type <code>CV_8U</code> then use <code><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa5d20fc86d41d59e4d71ae93daee9726" title="Returns a reference to the specified array element. ">Mat.at</a>&lt;uchar&gt;(y,x)</code>.</li>
<li>If matrix is of type <code>CV_8S</code> then use <code><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa5d20fc86d41d59e4d71ae93daee9726" title="Returns a reference to the specified array element. ">Mat.at</a>&lt;schar&gt;(y,x)</code>.</li>
<li>If matrix is of type <code>CV_16U</code> then use <code><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa5d20fc86d41d59e4d71ae93daee9726" title="Returns a reference to the specified array element. ">Mat.at</a>&lt;ushort&gt;(y,x)</code>.</li>
<li>If matrix is of type <code>CV_16S</code> then use <code><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa5d20fc86d41d59e4d71ae93daee9726" title="Returns a reference to the specified array element. ">Mat.at</a>&lt;short&gt;(y,x)</code>.</li>
<li>If matrix is of type <code>CV_32S</code> then use <code><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa5d20fc86d41d59e4d71ae93daee9726" title="Returns a reference to the specified array element. ">Mat.at</a>&lt;int&gt;(y,x)</code>.</li>
<li>If matrix is of type <code>CV_32F</code> then use <code><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa5d20fc86d41d59e4d71ae93daee9726" title="Returns a reference to the specified array element. ">Mat.at</a>&lt;float&gt;(y,x)</code>.</li>
<li>If matrix is of type <code>CV_64F</code> then use <code><a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa5d20fc86d41d59e4d71ae93daee9726" title="Returns a reference to the specified array element. ">Mat.at</a>&lt;double&gt;(y,x)</code>.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">i0</td><td>Index along the dimension 0 </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d6/d7f/samples_2cpp_2camshiftdemo_8cpp-example.html#a44">samples/cpp/camshiftdemo.cpp</a>, <a class="el" href="../../de/d01/samples_2cpp_2connected_components_8cpp-example.html#a6">samples/cpp/connected_components.cpp</a>, <a class="el" href="../../d9/d15/samples_2cpp_2cout_mat_8cpp-example.html#a4">samples/cpp/cout_mat.cpp</a>, <a class="el" href="../../da/d53/samples_2cpp_2demhist_8cpp-example.html#a16">samples/cpp/demhist.cpp</a>, <a class="el" href="../../d9/d73/samples_2cpp_2fitellipse_8cpp-example.html#a25">samples/cpp/fitellipse.cpp</a>, <a class="el" href="../../dd/d93/samples_2cpp_2image_alignment_8cpp-example.html#a11">samples/cpp/image_alignment.cpp</a>, <a class="el" href="../../de/d70/samples_2cpp_2kalman_8cpp-example.html#a22">samples/cpp/kalman.cpp</a>, <a class="el" href="../../d9/dde/samples_2cpp_2kmeans_8cpp-example.html#a23">samples/cpp/kmeans.cpp</a>, <a class="el" href="../../d0/df8/samples_2cpp_2train_HOG_8cpp-example.html#a8">samples/cpp/train_HOG.cpp</a>, <a class="el" href="../../de/d45/samples_2cpp_2tutorial_code_2features2D_2Homography_2decompose_homography_8cpp-example.html#a19">samples/cpp/tutorial_code/features2D/Homography/decompose_homography.cpp</a>, <a class="el" href="../../d9/d47/samples_2cpp_2tutorial_code_2features2D_2Homography_2homography_from_camera_displacement_8cpp-example.html#a23">samples/cpp/tutorial_code/features2D/Homography/homography_from_camera_displacement.cpp</a>, <a class="el" href="../../d0/d92/samples_2cpp_2tutorial_code_2features2D_2Homography_2pose_from_homography_8cpp-example.html#a19">samples/cpp/tutorial_code/features2D/Homography/pose_from_homography.cpp</a>, and <a class="el" href="../../da/d94/samples_2cpp_2tutorial_code_2ml_2introduction_to_pca_2introduction_to_pca_8cpp-example.html#a16">samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a330d9adb78976b6efd4116c940924294"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a330d9adb78976b6efd4116c940924294">&#9670;&nbsp;</a></span>at() <span class="overload">[2/12]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const _Tp&amp; cv::Mat::at </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i0</em> = <code>0</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">i0</td><td>Index along the dimension 0 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ac40425b84f60b39fd35e03814122661f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac40425b84f60b39fd35e03814122661f">&#9670;&nbsp;</a></span>at() <span class="overload">[3/12]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">_Tp&amp; cv::Mat::at </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>col</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">row</td><td>Index along the dimension 0 </td></tr>
    <tr><td class="paramname">col</td><td>Index along the dimension 1 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a5db6b18954e334048cb35752f49c6f8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5db6b18954e334048cb35752f49c6f8c">&#9670;&nbsp;</a></span>at() <span class="overload">[4/12]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const _Tp&amp; cv::Mat::at </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>col</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">row</td><td>Index along the dimension 0 </td></tr>
    <tr><td class="paramname">col</td><td>Index along the dimension 1 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a305829ed5c0ecfef7b44db18953048e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a305829ed5c0ecfef7b44db18953048e8">&#9670;&nbsp;</a></span>at() <span class="overload">[5/12]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">_Tp&amp; cv::Mat::at </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">i0</td><td>Index along the dimension 0 </td></tr>
    <tr><td class="paramname">i1</td><td>Index along the dimension 1 </td></tr>
    <tr><td class="paramname">i2</td><td>Index along the dimension 2 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a59c6c2d9db1cfba76d75addeeb4e6a84"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59c6c2d9db1cfba76d75addeeb4e6a84">&#9670;&nbsp;</a></span>at() <span class="overload">[6/12]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const _Tp&amp; cv::Mat::at </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">i0</td><td>Index along the dimension 0 </td></tr>
    <tr><td class="paramname">i1</td><td>Index along the dimension 1 </td></tr>
    <tr><td class="paramname">i2</td><td>Index along the dimension 2 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a474bd5cdcf986672cfdc304f6be1cf64"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a474bd5cdcf986672cfdc304f6be1cf64">&#9670;&nbsp;</a></span>at() <span class="overload">[7/12]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">_Tp&amp; cv::Mat::at </td>
          <td>(</td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">idx</td><td>Array of <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a39cf614aa52567e9a945cd2609bd767b" title="the matrix dimensionality, &gt;= 2 ">Mat::dims</a> indices. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a2cbbb16670ae4d9aa747f19c24305213"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2cbbb16670ae4d9aa747f19c24305213">&#9670;&nbsp;</a></span>at() <span class="overload">[8/12]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const _Tp&amp; cv::Mat::at </td>
          <td>(</td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">idx</td><td>Array of <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a39cf614aa52567e9a945cd2609bd767b" title="the matrix dimensionality, &gt;= 2 ">Mat::dims</a> indices. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9ec1aadc17ab8c8f8334d521719c7732"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ec1aadc17ab8c8f8334d521719c7732">&#9670;&nbsp;</a></span>at() <span class="overload">[9/12]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp , int n&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">_Tp&amp; cv::Mat::at </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d6/dcf/classcv_1_1Vec.html">Vec</a>&lt; int, n &gt; &amp;&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a15c649a94cf2e06240b32b025231301f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a15c649a94cf2e06240b32b025231301f">&#9670;&nbsp;</a></span>at() <span class="overload">[10/12]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp , int n&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const _Tp&amp; cv::Mat::at </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d6/dcf/classcv_1_1Vec.html">Vec</a>&lt; int, n &gt; &amp;&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a23cd599a27c59bae64b0c40ad645ea49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23cd599a27c59bae64b0c40ad645ea49">&#9670;&nbsp;</a></span>at() <span class="overload">[11/12]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">_Tp&amp; cv::Mat::at </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a>&#160;</td>
          <td class="paramname"><em>pt</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. special versions for 2D arrays (especially convenient for referencing image pixels) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pt</td><td>Element position specified as Point(j,i) . </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a87d0b2e01b0f8686957398ecfb168a6d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87d0b2e01b0f8686957398ecfb168a6d">&#9670;&nbsp;</a></span>at() <span class="overload">[12/12]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const _Tp&amp; cv::Mat::at </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a>&#160;</td>
          <td class="paramname"><em>pt</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. special versions for 2D arrays (especially convenient for referencing image pixels) </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pt</td><td>Element position specified as Point(j,i) . </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a33ee3bc402827f587a5ad64b568d6986"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33ee3bc402827f587a5ad64b568d6986">&#9670;&nbsp;</a></span>begin() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d4/dfe/classcv_1_1MatIterator__.html">MatIterator_</a>&lt;_Tp&gt; cv::Mat::begin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the matrix iterator and sets it to the first matrix element. </p>
<p>The methods return the matrix read-only or read-write iterators. The use of matrix iterators is very similar to the use of bi-directional STL iterators. In the example below, the alpha blending function is rewritten using the matrix iterators: </p><div class="fragment"><div class="line"><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><span class="keywordtype">void</span> alphaBlendRGBA(<span class="keyword">const</span> <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a>&amp; src1, <span class="keyword">const</span> <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a>&amp; src2, <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a>&amp; dst)</div><div class="line">{</div><div class="line">    <span class="keyword">typedef</span> Vec&lt;T, 4&gt; VT;</div><div class="line"></div><div class="line">    <span class="keyword">const</span> <span class="keywordtype">float</span> alpha_scale = (float)<a class="code" href="../../d7/dcc/group__core__utils__softfloat.html#ga78f988f6cfa6223610298cbd4f86ec66">std::numeric_limits&lt;T&gt;::max</a>(),</div><div class="line">                inv_scale = 1.f/alpha_scale;</div><div class="line"></div><div class="line">    <a class="code" href="../../db/de0/group__core__utils.html#gaf62bcd90f70e275191ab95136d85906b">CV_Assert</a>( src1.type() == src2.type() &amp;&amp;</div><div class="line">               src1.type() == traits::Type&lt;VT&gt;::value &amp;&amp;</div><div class="line">               src1.size() == src2.size());</div><div class="line">    <a class="code" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> size = src1.size();</div><div class="line">    dst.create(size, src1.type());</div><div class="line"></div><div class="line">    MatConstIterator_&lt;VT&gt; it1 = src1.begin&lt;VT&gt;(), it1_end = src1.end&lt;VT&gt;();</div><div class="line">    MatConstIterator_&lt;VT&gt; it2 = src2.begin&lt;VT&gt;();</div><div class="line">    MatIterator_&lt;VT&gt; dst_it = dst.begin&lt;VT&gt;();</div><div class="line"></div><div class="line">    <span class="keywordflow">for</span>( ; it1 != it1_end; ++it1, ++it2, ++dst_it )</div><div class="line">    {</div><div class="line">        VT pix1 = *it1, pix2 = *it2;</div><div class="line">        <span class="keywordtype">float</span> alpha = pix1[3]*inv_scale, beta = pix2[3]*inv_scale;</div><div class="line">        *dst_it = VT(saturate_cast&lt;T&gt;(pix1[0]*alpha + pix2[0]*beta),</div><div class="line">                     saturate_cast&lt;T&gt;(pix1[1]*alpha + pix2[1]*beta),</div><div class="line">                     saturate_cast&lt;T&gt;(pix1[2]*alpha + pix2[2]*beta),</div><div class="line">                     saturate_cast&lt;T&gt;((1 - (1-alpha)*(1-beta))*alpha_scale));</div><div class="line">    }</div><div class="line">}</div></div><!-- fragment --> 
</div>
</div>
<a id="aef8f88bc1f72757b0f2ddb3041611c73"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aef8f88bc1f72757b0f2ddb3041611c73">&#9670;&nbsp;</a></span>begin() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d1/de0/classcv_1_1MatConstIterator__.html">MatConstIterator_</a>&lt;_Tp&gt; cv::Mat::begin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aa11336b9ac538e0475d840657ce164be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa11336b9ac538e0475d840657ce164be">&#9670;&nbsp;</a></span>channels()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::Mat::channels </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of matrix channels. </p>
<p>The method returns the number of matrix channels. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d3/db0/samples_2cpp_2pca_8cpp-example.html#a10">samples/cpp/pca.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a167a8e0a3a3d86e84b70e33483af4466"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a167a8e0a3a3d86e84b70e33483af4466">&#9670;&nbsp;</a></span>checkVector()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::Mat::checkVector </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>elemChannels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>depth</em> = <code>-1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>requireContinuous</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">elemChannels</td><td>Number of channels or number of columns the matrix should have. For a 2-D matrix, when the matrix has only 1 column, then it should have elemChannels channels; When the matrix has only 1 channel, then it should have elemChannels columns. For a 3-D matrix, it should have only one channel. Furthermore, if the number of planes is not one, then the number of rows within every plane has to be 1; if the number of rows within every plane is not 1, then the number of planes has to be 1. </td></tr>
    <tr><td class="paramname">depth</td><td>The depth the matrix should have. Set it to -1 when any depth is fine. </td></tr>
    <tr><td class="paramname">requireContinuous</td><td>Set it to true to require the matrix to be continuous </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>-1 if the requirement is not satisfied. Otherwise, it returns the number of elements in the matrix. Note that an element may have multiple channels.</dd></dl>
<p>The following code demonstrates its usage for a 2-d matrix: </p><div class="fragment"><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html">cv::Mat</a> mat(20, 1, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga15d6109d87682bf909122d0ce51c46a6">CV_32FC2</a>);</div><div class="line">    <span class="keywordtype">int</span> n = mat.checkVector(2);</div><div class="line">    <a class="code" href="../../db/de0/group__core__utils.html#gaf62bcd90f70e275191ab95136d85906b">CV_Assert</a>(n == 20); <span class="comment">// mat has 20 elements</span></div><div class="line"></div><div class="line">    mat.create(20, 2, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>);</div><div class="line">    n = mat.checkVector(1);</div><div class="line">    <a class="code" href="../../db/de0/group__core__utils.html#gaf62bcd90f70e275191ab95136d85906b">CV_Assert</a>(n == -1); <span class="comment">// mat is neither a column nor a row vector</span></div><div class="line"></div><div class="line">    n = mat.checkVector(2);</div><div class="line">    <a class="code" href="../../db/de0/group__core__utils.html#gaf62bcd90f70e275191ab95136d85906b">CV_Assert</a>(n == 20); <span class="comment">// the 2 columns are considered as 1 element</span></div></div><!-- fragment --><p> The following code demonstrates its usage for a 3-d matrix: </p><div class="fragment"><div class="line">    <span class="keywordtype">int</span> <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a39cf614aa52567e9a945cd2609bd767b">dims</a>[] = {1, 3, 5}; <span class="comment">// 1 plane, every plane has 3 rows and 5 columns</span></div><div class="line">    mat.create(3, dims, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>); <span class="comment">// for 3-d mat, it MUST have only 1 channel</span></div><div class="line">    n = mat.checkVector(5); <span class="comment">// the 5 columns are considered as 1 element</span></div><div class="line">    <a class="code" href="../../db/de0/group__core__utils.html#gaf62bcd90f70e275191ab95136d85906b">CV_Assert</a>(n == 3);</div><div class="line"></div><div class="line">    <span class="keywordtype">int</span> dims2[] = {3, 1, 5}; <span class="comment">// 3 planes, every plane has 1 row and 5 columns</span></div><div class="line">    mat.create(3, dims2, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>);</div><div class="line">    n = mat.checkVector(5); <span class="comment">// the 5 columns are considered as 1 element</span></div><div class="line">    <a class="code" href="../../db/de0/group__core__utils.html#gaf62bcd90f70e275191ab95136d85906b">CV_Assert</a>(n == 3);</div></div><!-- fragment -->
</div>
</div>
<a id="adff2ea98da45eae0833e73582dd4a660"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adff2ea98da45eae0833e73582dd4a660">&#9670;&nbsp;</a></span>clone()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::clone </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a full copy of the array and the underlying data. </p>
<p>The method creates a full copy of the array. The original step[] is not taken into account. So, the array copy is a continuous array occupying <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa4d317d43fb0cba9c2503f3c61b866c8" title="Returns the total number of array elements. ">total()</a>*elemSize() bytes. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../db/d75/samples_2cpp_2create_mask_8cpp-example.html#a4">samples/cpp/create_mask.cpp</a>, <a class="el" href="../../d4/d26/samples_2cpp_2facedetect_8cpp-example.html#a18">samples/cpp/facedetect.cpp</a>, <a class="el" href="../../d9/dd8/samples_2cpp_2stitching_detailed_8cpp-example.html#a15">samples/cpp/stitching_detailed.cpp</a>, <a class="el" href="../../d0/df8/samples_2cpp_2train_HOG_8cpp-example.html#a28">samples/cpp/train_HOG.cpp</a>, <a class="el" href="../../d9/d47/samples_2cpp_2tutorial_code_2features2D_2Homography_2homography_from_camera_displacement_8cpp-example.html#a13">samples/cpp/tutorial_code/features2D/Homography/homography_from_camera_displacement.cpp</a>, <a class="el" href="../../d0/d92/samples_2cpp_2tutorial_code_2features2D_2Homography_2pose_from_homography_8cpp-example.html#a9">samples/cpp/tutorial_code/features2D/Homography/pose_from_homography.cpp</a>, <a class="el" href="../../d3/d8f/samples_2cpp_2tutorial_code_2ImgProc_2Smoothing_2Smoothing_8cpp-example.html#a7">samples/cpp/tutorial_code/ImgProc/Smoothing/Smoothing.cpp</a>, <a class="el" href="../../d5/df9/samples_2cpp_2tutorial_code_2ImgTrans_2houghlines_8cpp-example.html#a8">samples/cpp/tutorial_code/ImgTrans/houghlines.cpp</a>, and <a class="el" href="../../de/dd4/samples_2cpp_2warpPerspective_demo_8cpp-example.html#a15">samples/cpp/warpPerspective_demo.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a23df02a07ffbfa4aa59c19bc003919fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23df02a07ffbfa4aa59c19bc003919fe">&#9670;&nbsp;</a></span>col()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::col </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a matrix header for the specified matrix column. </p>
<p>The method makes a new header for the specified matrix column and returns it. This is an O(1) operation, regardless of the matrix size. The underlying data of the new matrix is shared with the original matrix. See also the <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4b22e1c23af7a7f2eef8fa478cfa7434" title="Creates a matrix header for the specified matrix row. ">Mat::row</a> description. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>A 0-based column index. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d0/d92/samples_2cpp_2tutorial_code_2features2D_2Homography_2pose_from_homography_8cpp-example.html#a20">samples/cpp/tutorial_code/features2D/Homography/pose_from_homography.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="aadc8f9210fe4dec50513746c246fa8d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadc8f9210fe4dec50513746c246fa8d9">&#9670;&nbsp;</a></span>colRange() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::colRange </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>startcol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>endcol</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a matrix header for the specified column span. </p>
<p>The method makes a new header for the specified column span of the matrix. Similarly to <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4b22e1c23af7a7f2eef8fa478cfa7434" title="Creates a matrix header for the specified matrix row. ">Mat::row</a> and <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a23df02a07ffbfa4aa59c19bc003919fe" title="Creates a matrix header for the specified matrix column. ">Mat::col</a> , this is an O(1) operation. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">startcol</td><td>An inclusive 0-based start index of the column span. </td></tr>
    <tr><td class="paramname">endcol</td><td>An exclusive 0-based ending index of the column span. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="acccb63e44eba6ba81ead99881bd1997e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acccb63e44eba6ba81ead99881bd1997e">&#9670;&nbsp;</a></span>colRange() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::colRange </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> &amp;&#160;</td>
          <td class="paramname"><em>r</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td><a class="el" href="../../da/d35/classcv_1_1Range.html" title="Template class specifying a continuous subsequence (slice) of a sequence. ">Range</a> structure containing both the start and the end indices. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="adf88c60c5b4980e05bb556080916978b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adf88c60c5b4980e05bb556080916978b">&#9670;&nbsp;</a></span>convertTo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::convertTo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a>&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rtype</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>alpha</em> = <code>1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>beta</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Converts an array to another data type with optional scaling. </p>
<p>The method converts source pixel values to the target data type. saturate_cast&lt;&gt; is applied at the end to avoid possible overflows:</p>
<p class="formulaDsp">
\[m(x,y) = saturate \_ cast&lt;rType&gt;( \alpha (*this)(x,y) + \beta )\]
</p>
 <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>output matrix; if it does not have a proper size or type before the operation, it is reallocated. </td></tr>
    <tr><td class="paramname">rtype</td><td>desired output matrix type or, rather, the depth since the number of channels are the same as the input has; if rtype is negative, the output matrix will have the same type as the input. </td></tr>
    <tr><td class="paramname">alpha</td><td>optional scale factor. </td></tr>
    <tr><td class="paramname">beta</td><td>optional delta added to the scaled values. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../da/d53/samples_2cpp_2demhist_8cpp-example.html#a1">samples/cpp/demhist.cpp</a>, <a class="el" href="../../d4/dc6/samples_2cpp_2distrans_8cpp-example.html#a8">samples/cpp/distrans.cpp</a>, <a class="el" href="../../d9/d73/samples_2cpp_2fitellipse_8cpp-example.html#a52">samples/cpp/fitellipse.cpp</a>, <a class="el" href="../../d3/db0/samples_2cpp_2pca_8cpp-example.html#a7">samples/cpp/pca.cpp</a>, <a class="el" href="../../d9/dd8/samples_2cpp_2stitching_detailed_8cpp-example.html#a20">samples/cpp/stitching_detailed.cpp</a>, and <a class="el" href="../../d6/d39/samples_2dnn_2colorization_8cpp-example.html#a13">samples/dnn/colorization.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a39fd9880fc55b7a0993bcfff88061ac4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a39fd9880fc55b7a0993bcfff88061ac4">&#9670;&nbsp;</a></span>copySize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::copySize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>internal use function; properly re-allocates _size, _step arrays </p>

</div>
</div>
<a id="a33fd5d125b4c302b0c9aa86980791a77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33fd5d125b4c302b0c9aa86980791a77">&#9670;&nbsp;</a></span>copyTo() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::copyTo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a>&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Copies the matrix to another one. </p>
<p>The method copies the matrix data to another matrix. Before copying the data, the method invokes : </p><div class="fragment"><div class="line">m.create(this-&gt;<a class="code" href="../../d3/d63/classcv_1_1Mat.html#a146f8e8dda07d1365a575ab83d9828d1">size</a>(), this-&gt;<a class="code" href="../../d3/d63/classcv_1_1Mat.html#af2d2652e552d7de635988f18a84b53e5">type</a>());</div></div><!-- fragment --><p> so that the destination matrix is reallocated if needed. While m.copyTo(m); works flawlessly, the function does not handle the case of a partial overlap between the source and the destination matrices.</p>
<p>When the operation mask is specified, if the <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a55ced2c8d844d683ea9a725c60037ad0" title="Allocates new array data if needed. ">Mat::create</a> call shown above reallocates the matrix, the newly allocated matrix is initialized with all zeros before copying the data. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>Destination matrix. If it does not have a proper size or type before the operation, it is reallocated. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d6/d7f/samples_2cpp_2camshiftdemo_8cpp-example.html#a30">samples/cpp/camshiftdemo.cpp</a>, <a class="el" href="../../d6/d56/samples_2cpp_2edge_8cpp-example.html#a5">samples/cpp/edge.cpp</a>, <a class="el" href="../../d8/d34/samples_2cpp_2grabcut_8cpp-example.html#a19">samples/cpp/grabcut.cpp</a>, <a class="el" href="../../dd/d93/samples_2cpp_2image_alignment_8cpp-example.html#a25">samples/cpp/image_alignment.cpp</a>, <a class="el" href="../../d2/d1d/samples_2cpp_2lkdemo_8cpp-example.html#a16">samples/cpp/lkdemo.cpp</a>, <a class="el" href="../../d8/ded/samples_2cpp_2tutorial_code_2Histograms_Matching_2MatchTemplate_Demo_8cpp-example.html#a9">samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp</a>, <a class="el" href="../../d4/d40/samples_2cpp_2watershed_8cpp-example.html#a20">samples/cpp/watershed.cpp</a>, <a class="el" href="../../d8/d61/samples_2tapi_2hog_8cpp-example.html#a19">samples/tapi/hog.cpp</a>, and <a class="el" href="../../de/dc0/samples_2tapi_2squares_8cpp-example.html#a45">samples/tapi/squares.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a626fe5f96d02525e2604d2ad46dd574f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a626fe5f96d02525e2604d2ad46dd574f">&#9670;&nbsp;</a></span>copyTo() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::copyTo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a>&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>Destination matrix. If it does not have a proper size or type before the operation, it is reallocated. </td></tr>
    <tr><td class="paramname">mask</td><td>Operation mask of the same size as *this. Its non-zero elements indicate which matrix elements need to be copied. The mask has to be of type CV_8U and can have 1 or multiple channels. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a55ced2c8d844d683ea9a725c60037ad0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a55ced2c8d844d683ea9a725c60037ad0">&#9670;&nbsp;</a></span>create() <span class="overload">[1/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::create </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cols</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocates new array data if needed. </p>
<p>This is one of the key <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> methods. Most new-style OpenCV functions and methods that produce arrays call this method for each output array. The method uses the following algorithm:</p>
<ol type="1">
<li>If the current array shape and the type match the new ones, return immediately. Otherwise, de-reference the previous data by calling <a class="el" href="../../d3/d63/classcv_1_1Mat.html#ae48d4913285518e2c21a3457017e716e" title="Decrements the reference counter and deallocates the matrix if needed. ">Mat::release</a>.</li>
<li>Initialize the new header.</li>
<li>Allocate the new data of <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa4d317d43fb0cba9c2503f3c61b866c8" title="Returns the total number of array elements. ">total()</a>*elemSize() bytes.</li>
<li>Allocate the new, associated with the data, reference counter and set it to 1.</li>
</ol>
<p>Such a scheme makes the memory management robust and efficient at the same time and helps avoid extra typing for you. This means that usually there is no need to explicitly allocate output arrays. That is, instead of writing: </p><div class="fragment"><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> color;</div><div class="line">...</div><div class="line">Mat gray(color.rows, color.cols, color.depth());</div><div class="line"><a class="code" href="../../d8/d01/group__imgproc__color__conversions.html#ga397ae87e1288a81d2363b61574eb8cab">cvtColor</a>(color, gray, <a class="code" href="../../d8/d01/group__imgproc__color__conversions.html#gga4e0972be5de079fed4e3a10e24ef5ef0a353a4b8db9040165db4dacb5bcefb6ea">COLOR_BGR2GRAY</a>);</div></div><!-- fragment --><p> you can simply write: </p><div class="fragment"><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> color;</div><div class="line">...</div><div class="line">Mat gray;</div><div class="line"><a class="code" href="../../d8/d01/group__imgproc__color__conversions.html#ga397ae87e1288a81d2363b61574eb8cab">cvtColor</a>(color, gray, <a class="code" href="../../d8/d01/group__imgproc__color__conversions.html#gga4e0972be5de079fed4e3a10e24ef5ef0a353a4b8db9040165db4dacb5bcefb6ea">COLOR_BGR2GRAY</a>);</div></div><!-- fragment --><p> because cvtColor, as well as the most of OpenCV functions, calls <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a55ced2c8d844d683ea9a725c60037ad0" title="Allocates new array data if needed. ">Mat::create()</a> for the output array internally. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rows</td><td>New number of rows. </td></tr>
    <tr><td class="paramname">cols</td><td>New number of columns. </td></tr>
    <tr><td class="paramname">type</td><td>New matrix type. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d6/d7f/samples_2cpp_2camshiftdemo_8cpp-example.html#a36">samples/cpp/camshiftdemo.cpp</a>, <a class="el" href="../../d6/d56/samples_2cpp_2edge_8cpp-example.html#a14">samples/cpp/edge.cpp</a>, <a class="el" href="../../d1/d17/samples_2cpp_2ffilldemo_8cpp-example.html#a22">samples/cpp/ffilldemo.cpp</a>, <a class="el" href="../../d8/d34/samples_2cpp_2grabcut_8cpp-example.html#a12">samples/cpp/grabcut.cpp</a>, <a class="el" href="../../d9/dd8/samples_2cpp_2stitching_detailed_8cpp-example.html#a51">samples/cpp/stitching_detailed.cpp</a>, <a class="el" href="../../d8/ded/samples_2cpp_2tutorial_code_2Histograms_Matching_2MatchTemplate_Demo_8cpp-example.html#a12">samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp</a>, and <a class="el" href="../../d4/d88/samples_2dnn_2segmentation_8cpp-example.html#a36">samples/dnn/segmentation.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a48409946d0e1bebb40fe765e18ec5eea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a48409946d0e1bebb40fe765e18ec5eea">&#9670;&nbsp;</a></span>create() <span class="overload">[2/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::create </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>Alternative new matrix size specification: Size(cols, rows) </td></tr>
    <tr><td class="paramname">type</td><td>New matrix type. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aee53524ac61fa2ba441c4f29c3aca93f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee53524ac61fa2ba441c4f29c3aca93f">&#9670;&nbsp;</a></span>create() <span class="overload">[3/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::create </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ndims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>sizes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ndims</td><td>New array dimensionality. </td></tr>
    <tr><td class="paramname">sizes</td><td>Array of integers specifying a new array shape. </td></tr>
    <tr><td class="paramname">type</td><td>New matrix type. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a84f35d3923a92251631329eed66d2a12"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84f35d3923a92251631329eed66d2a12">&#9670;&nbsp;</a></span>create() <span class="overload">[4/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::create </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; int &gt; &amp;&#160;</td>
          <td class="paramname"><em>sizes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sizes</td><td>Array of integers specifying a new array shape. </td></tr>
    <tr><td class="paramname">type</td><td>New matrix type. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a708b761e0d15b7b8db4c8e8c95a7abe9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a708b761e0d15b7b8db4c8e8c95a7abe9">&#9670;&nbsp;</a></span>cross()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::cross </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Computes a cross-product of two 3-element vectors. </p>
<p>The method computes a cross-product of two 3-element vectors. The vectors must be 3-element floating-point vectors of the same shape and size. The result is another 3-element vector of the same shape and type as operands. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>Another cross-product operand. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d0/d92/samples_2cpp_2tutorial_code_2features2D_2Homography_2pose_from_homography_8cpp-example.html#a21">samples/cpp/tutorial_code/features2D/Homography/pose_from_homography.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ac6e9cdf9b450e360f005978b4e981b1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac6e9cdf9b450e360f005978b4e981b1a">&#9670;&nbsp;</a></span>deallocate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::deallocate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>internal use function, consider to use 'release' method instead; deallocates the matrix data </p>

</div>
</div>
<a id="a8da9f853b6f3a29d738572fd1ffc44c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8da9f853b6f3a29d738572fd1ffc44c0">&#9670;&nbsp;</a></span>depth()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::Mat::depth </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the depth of a matrix element. </p>
<p>The method returns the identifier of the matrix element depth (the type of each individual channel). For example, for a 16-bit signed element array, the method returns CV_16S . A complete list of matrix types contains the following values:</p><ul>
<li>CV_8U - 8-bit unsigned integers ( 0..255 )</li>
<li>CV_8S - 8-bit signed integers ( -128..127 )</li>
<li>CV_16U - 16-bit unsigned integers ( 0..65535 )</li>
<li>CV_16S - 16-bit signed integers ( -32768..32767 )</li>
<li>CV_32S - 32-bit signed integers ( -2147483648..2147483647 )</li>
<li>CV_32F - 32-bit floating-point numbers ( -FLT_MAX..FLT_MAX, INF, NAN )</li>
<li>CV_64F - 64-bit floating-point numbers ( -DBL_MAX..DBL_MAX, INF, NAN ) </li>
</ul>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d6/d7f/samples_2cpp_2camshiftdemo_8cpp-example.html#a38">samples/cpp/camshiftdemo.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a024cc0510a4c61c7f266d4ab9fe13d7a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a024cc0510a4c61c7f266d4ab9fe13d7a">&#9670;&nbsp;</a></span>diag() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::diag </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>d</em> = <code>0</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Extracts a diagonal from a matrix. </p>
<p>The method makes a new header for the specified matrix diagonal. The new matrix is represented as a single-column matrix. Similarly to <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4b22e1c23af7a7f2eef8fa478cfa7434" title="Creates a matrix header for the specified matrix row. ">Mat::row</a> and <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a23df02a07ffbfa4aa59c19bc003919fe" title="Creates a matrix header for the specified matrix column. ">Mat::col</a>, this is an O(1) operation. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>index of the diagonal, with the following values:<ul>
<li><code>d=0</code> is the main diagonal.</li>
<li><code>d&lt;0</code> is a diagonal from the lower half. For example, d=-1 means the diagonal is set immediately below the main one.</li>
<li><code>d&gt;0</code> is a diagonal from the upper half. For example, d=1 means the diagonal is set immediately above the main one. For example: <div class="fragment"><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> m = (Mat_&lt;int&gt;(3,3) &lt;&lt;</div><div class="line">            1,2,3,</div><div class="line">            4,5,6,</div><div class="line">            7,8,9);</div><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> d0 = m.diag(0);</div><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> d1 = m.diag(1);</div><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> d_1 = m.diag(-1);</div></div><!-- fragment --> The resulting matrices are <div class="fragment"><div class="line">d0 =</div><div class="line">  [1;</div><div class="line">   5;</div><div class="line">   9]</div><div class="line">d1 =</div><div class="line">  [2;</div><div class="line">   6]</div><div class="line">d_1 =</div><div class="line">  [4;</div><div class="line">   8]</div></div><!-- fragment --> </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a0f81856dbcb93eae6113947edb3ea068"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f81856dbcb93eae6113947edb3ea068">&#9670;&nbsp;</a></span>diag() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::diag </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&#160;</td>
          <td class="paramname"><em>d</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>creates a diagonal matrix </p>
<p>The method creates a square diagonal matrix from specified main diagonal. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">d</td><td>One-dimensional matrix that represents the main diagonal. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a0f683eab191eeece33dfc64ae299a9cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f683eab191eeece33dfc64ae299a9cb">&#9670;&nbsp;</a></span>dot()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double cv::Mat::dot </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Computes a dot-product of two vectors. </p>
<p>The method computes a dot-product of two matrices. If the matrices are not single-column or single-row vectors, the top-to-bottom left-to-right scan ordering is used to treat them as 1D vectors. The vectors must have the same size and type. If the matrices have more than one channel, the dot products from all the channels are summed together. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>another dot-product operand. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../de/d45/samples_2cpp_2tutorial_code_2features2D_2Homography_2decompose_homography_8cpp-example.html#a17">samples/cpp/tutorial_code/features2D/Homography/decompose_homography.cpp</a>, and <a class="el" href="../../d9/d47/samples_2cpp_2tutorial_code_2features2D_2Homography_2homography_from_camera_displacement_8cpp-example.html#a21">samples/cpp/tutorial_code/features2D/Homography/homography_from_camera_displacement.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="aba7a5ef00b22b70668fba575005dfe55"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aba7a5ef00b22b70668fba575005dfe55">&#9670;&nbsp;</a></span>elemSize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t cv::Mat::elemSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the matrix element size in bytes. </p>
<p>The method returns the matrix element size in bytes. For example, if the matrix type is CV_16SC3 , the method returns 3*sizeof(short) or 6. </p>

</div>
</div>
<a id="a9acde8f32d4b294558fb406bc05171bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9acde8f32d4b294558fb406bc05171bc">&#9670;&nbsp;</a></span>elemSize1()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t cv::Mat::elemSize1 </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the size of each matrix element channel in bytes. </p>
<p>The method returns the matrix element channel size in bytes, that is, it ignores the number of channels. For example, if the matrix type is CV_16SC3 , the method returns sizeof(short) or 2. </p>

</div>
</div>
<a id="abbec3525a852e77998aba034813fded4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abbec3525a852e77998aba034813fded4">&#9670;&nbsp;</a></span>empty()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool cv::Mat::empty </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns true if the array has no elements. </p>
<p>The method returns true if <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa4d317d43fb0cba9c2503f3c61b866c8" title="Returns the total number of array elements. ">Mat::total()</a> is 0 or if <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4d33bed1c850265370d2af0ff02e1564" title="pointer to the data ">Mat::data</a> is NULL. Because of <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a88bbb01901fdfe3f1d0592c592e8757c" title="Removes elements from the bottom of the matrix. ">pop_back()</a> and <a class="el" href="../../d3/d63/classcv_1_1Mat.html#ad0127b138acfcc2dcd5dafc51175b309" title="Changes the number of matrix rows. ">resize()</a> methods <code><a class="el" href="../../df/d57/namespacecv_1_1dnn.html#a65ad6cf1b64a572bf78d696d2014b0e6">M.total()</a> == 0</code> does not imply that <code>M.data == NULL</code>. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d1/d9e/fld_lines_8cpp-example.html#a8">fld_lines.cpp</a>, <a class="el" href="../../d4/d26/samples_2cpp_2facedetect_8cpp-example.html#a16">samples/cpp/facedetect.cpp</a>, <a class="el" href="../../d9/d73/samples_2cpp_2fitellipse_8cpp-example.html#a15">samples/cpp/fitellipse.cpp</a>, <a class="el" href="../../d8/d34/samples_2cpp_2grabcut_8cpp-example.html#a5">samples/cpp/grabcut.cpp</a>, <a class="el" href="../../dd/d93/samples_2cpp_2image_alignment_8cpp-example.html#a24">samples/cpp/image_alignment.cpp</a>, <a class="el" href="../../d2/d1d/samples_2cpp_2lkdemo_8cpp-example.html#a23">samples/cpp/lkdemo.cpp</a>, <a class="el" href="../../db/d00/samples_2cpp_2squares_8cpp-example.html#a28">samples/cpp/squares.cpp</a>, <a class="el" href="../../db/db4/samples_2cpp_2stitching_8cpp-example.html#a4">samples/cpp/stitching.cpp</a>, <a class="el" href="../../d9/dd8/samples_2cpp_2stitching_detailed_8cpp-example.html#a8">samples/cpp/stitching_detailed.cpp</a>, <a class="el" href="../../d0/df8/samples_2cpp_2train_HOG_8cpp-example.html#a18">samples/cpp/train_HOG.cpp</a>, <a class="el" href="../../dc/dbc/samples_2cpp_2tutorial_code_2HighGUI_2AddingImagesTrackbar_8cpp-example.html#a5">samples/cpp/tutorial_code/HighGUI/AddingImagesTrackbar.cpp</a>, <a class="el" href="../../d8/ded/samples_2cpp_2tutorial_code_2Histograms_Matching_2MatchTemplate_Demo_8cpp-example.html#a4">samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp</a>, <a class="el" href="../../df/d5e/samples_2cpp_2tutorial_code_2ImgProc_2Morphology_1_8cpp-example.html#a5">samples/cpp/tutorial_code/ImgProc/Morphology_1.cpp</a>, <a class="el" href="../../da/d34/samples_2cpp_2tutorial_code_2ImgProc_2Morphology_2_8cpp-example.html#a5">samples/cpp/tutorial_code/ImgProc/Morphology_2.cpp</a>, <a class="el" href="../../d3/d08/samples_2cpp_2tutorial_code_2ImgProc_2Pyramids_2Pyramids_8cpp-example.html#a3">samples/cpp/tutorial_code/ImgProc/Pyramids/Pyramids.cpp</a>, <a class="el" href="../../d3/d8f/samples_2cpp_2tutorial_code_2ImgProc_2Smoothing_2Smoothing_8cpp-example.html#a6">samples/cpp/tutorial_code/ImgProc/Smoothing/Smoothing.cpp</a>, <a class="el" href="../../d6/d14/samples_2cpp_2tutorial_code_2ImgTrans_2copyMakeBorder_demo_8cpp-example.html#a6">samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp</a>, <a class="el" href="../../d1/de6/samples_2cpp_2tutorial_code_2ImgTrans_2houghcircles_8cpp-example.html#a4">samples/cpp/tutorial_code/ImgTrans/houghcircles.cpp</a>, <a class="el" href="../../d5/df9/samples_2cpp_2tutorial_code_2ImgTrans_2houghlines_8cpp-example.html#a4">samples/cpp/tutorial_code/ImgTrans/houghlines.cpp</a>, <a class="el" href="../../da/d94/samples_2cpp_2tutorial_code_2ml_2introduction_to_pca_2introduction_to_pca_8cpp-example.html#a25">samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp</a>, <a class="el" href="../../de/dd9/samples_2cpp_2tutorial_code_2photo_2non_photorealistic_rendering_2npr_demo_8cpp-example.html#a6">samples/cpp/tutorial_code/photo/non_photorealistic_rendering/npr_demo.cpp</a>, <a class="el" href="../../dc/d23/samples_2cpp_2tutorial_code_2photo_2seamless_cloning_2cloning_demo_8cpp-example.html#a4">samples/cpp/tutorial_code/photo/seamless_cloning/cloning_demo.cpp</a>, <a class="el" href="../../d4/d40/samples_2cpp_2watershed_8cpp-example.html#a18">samples/cpp/watershed.cpp</a>, <a class="el" href="../../d6/d39/samples_2dnn_2colorization_8cpp-example.html#a5">samples/dnn/colorization.cpp</a>, <a class="el" href="../../d4/db9/samples_2dnn_2object_detection_8cpp-example.html#a20">samples/dnn/object_detection.cpp</a>, <a class="el" href="../../d7/d4f/samples_2dnn_2openpose_8cpp-example.html#a9">samples/dnn/openpose.cpp</a>, and <a class="el" href="../../d4/d88/samples_2dnn_2segmentation_8cpp-example.html#a38">samples/dnn/segmentation.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a9dd628eeccedea6e181ca54d41830a62"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9dd628eeccedea6e181ca54d41830a62">&#9670;&nbsp;</a></span>end() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d4/dfe/classcv_1_1MatIterator__.html">MatIterator_</a>&lt;_Tp&gt; cv::Mat::end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the matrix iterator and sets it to the after-last matrix element. </p>
<p>The methods return the matrix read-only or read-write iterators, set to the point following the last matrix element. </p>

</div>
</div>
<a id="a092f54359c99e42729715024fc662182"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a092f54359c99e42729715024fc662182">&#9670;&nbsp;</a></span>end() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d1/de0/classcv_1_1MatConstIterator__.html">MatConstIterator_</a>&lt;_Tp&gt; cv::Mat::end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a2cf9b9acde7a9852542bbc20ef851ed2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2cf9b9acde7a9852542bbc20ef851ed2">&#9670;&nbsp;</a></span>eye() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a> cv::Mat::eye </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cols</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns an identity matrix of the specified size and type. </p>
<p>The method returns a Matlab-style identity matrix initializer, similarly to <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a0b57b6a326c8876d944d188a46e0f556" title="Returns a zero array of the specified size and type. ">Mat::zeros</a>. Similarly to <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a69ae0402d116fc9c71908d8508dc2f09" title="Returns an array of all 1&#39;s of the specified size and type. ">Mat::ones</a>, you can use a scale operation to create a scaled identity matrix efficiently: </p><div class="fragment"><div class="line"><span class="comment">// make a 4x4 diagonal matrix with 0.1&#39;s on the diagonal.</span></div><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> A = <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2cf9b9acde7a9852542bbc20ef851ed2">Mat::eye</a>(4, 4, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga4a3def5d72b74bed31f5f8ab7676099c">CV_32F</a>)*0.1;</div></div><!-- fragment --> <dl class="section note"><dt>Note</dt><dd>In case of multi-channels type, identity matrix will be initialized only for the first channel, the others will be set to 0's </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rows</td><td>Number of rows. </td></tr>
    <tr><td class="paramname">cols</td><td>Number of columns. </td></tr>
    <tr><td class="paramname">type</td><td>Created matrix type. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../dd/d93/samples_2cpp_2image_alignment_8cpp-example.html#a8">samples/cpp/image_alignment.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="aab87b56e1dc370ffe4afb735b6a1e5c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aab87b56e1dc370ffe4afb735b6a1e5c9">&#9670;&nbsp;</a></span>eye() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a> cv::Mat::eye </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>Alternative matrix size specification as Size(cols, rows) . </td></tr>
    <tr><td class="paramname">type</td><td>Created matrix type. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a952ef1a85d70a510240cb645a90efc0d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a952ef1a85d70a510240cb645a90efc0d">&#9670;&nbsp;</a></span>forEach() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp , typename Functor &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::forEach </td>
          <td>(</td>
          <td class="paramtype">const Functor &amp;&#160;</td>
          <td class="paramname"><em>operation</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Runs the given functor over all matrix elements in parallel. </p>
<p>The operation passed as argument has to be a function pointer, a function object or a lambda(C++11).</p>
<p>Example 1. All of the operations below put 0xFF the first channel of all matrix elements: </p><div class="fragment"><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> image(1920, 1080, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>);</div><div class="line"><span class="keyword">typedef</span> <a class="code" href="../../df/d6c/classcv_1_1Point3__.html">cv::Point3_&lt;uint8_t&gt;</a> Pixel;</div><div class="line"></div><div class="line"><span class="comment">// first. raw pointer access.</span></div><div class="line"><span class="keywordflow">for</span> (<span class="keywordtype">int</span> r = 0; r &lt; image.<a class="code" href="../../de/de1/classcv_1_1Matx.html#a5a5955a6d8274a374aa637b21272f3a3a883ccff445b70d8c5673612fcea63374">rows</a>; ++r) {</div><div class="line">    Pixel* <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a13acd320291229615ef15f96ff1ff738">ptr</a> = image.ptr&lt;Pixel&gt;(r, 0);</div><div class="line">    <span class="keyword">const</span> Pixel* ptr_end = ptr + image.cols;</div><div class="line">    <span class="keywordflow">for</span> (; ptr != ptr_end; ++<a class="code" href="../../d3/d63/classcv_1_1Mat.html#a13acd320291229615ef15f96ff1ff738">ptr</a>) {</div><div class="line">        ptr-&gt;x = 255;</div><div class="line">    }</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// Using MatIterator. (Simple but there are a Iterator&#39;s overhead)</span></div><div class="line"><span class="keywordflow">for</span> (Pixel &amp;p : <a class="code" href="../../df/dfc/classcv_1_1Mat__.html">cv::Mat_&lt;Pixel&gt;</a>(image)) {</div><div class="line">    p.x = 255;</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// Parallel execution with function object.</span></div><div class="line"><span class="keyword">struct </span>Operator {</div><div class="line">    <span class="keywordtype">void</span> <a class="code" href="../../d3/d63/classcv_1_1Mat.html#ad543b6bd296ae1247032c750af4718e1">operator ()</a>(Pixel &amp;pixel, <span class="keyword">const</span> <span class="keywordtype">int</span> * position) {</div><div class="line">        pixel.x = 255;</div><div class="line">    }</div><div class="line">};</div><div class="line">image.<a class="code" href="../../d3/d63/classcv_1_1Mat.html#a952ef1a85d70a510240cb645a90efc0d">forEach</a>&lt;Pixel&gt;(Operator());</div><div class="line"></div><div class="line"><span class="comment">// Parallel execution using C++11 lambda.</span></div><div class="line">image.forEach&lt;Pixel&gt;([](Pixel &amp;p, <span class="keyword">const</span> <span class="keywordtype">int</span> * position) -&gt; <span class="keywordtype">void</span> {</div><div class="line">    p.x = 255;</div><div class="line">});</div></div><!-- fragment --><p> Example 2. Using the pixel's position: </p><div class="fragment"><div class="line"><span class="comment">// Creating 3D matrix (255 x 255 x 255) typed uint8_t</span></div><div class="line"><span class="comment">// and initialize all elements by the value which equals elements position.</span></div><div class="line"><span class="comment">// i.e. pixels (x,y,z) = (1,2,3) is (b,g,r) = (1,2,3).</span></div><div class="line"></div><div class="line"><span class="keywordtype">int</span> sizes[] = { 255, 255, 255 };</div><div class="line"><span class="keyword">typedef</span> <a class="code" href="../../df/d6c/classcv_1_1Point3__.html">cv::Point3_&lt;uint8_t&gt;</a> Pixel;</div><div class="line"></div><div class="line">Mat_&lt;Pixel&gt; image = <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a0b57b6a326c8876d944d188a46e0f556">Mat::zeros</a>(3, sizes, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>);</div><div class="line"></div><div class="line">image.forEach&lt;Pixel&gt;([&amp;](Pixel&amp; pixel, <span class="keyword">const</span> <span class="keywordtype">int</span> position[]) -&gt; <span class="keywordtype">void</span> {</div><div class="line">    pixel.x = position[0];</div><div class="line">    pixel.y = position[1];</div><div class="line">    pixel.z = position[2];</div><div class="line">});</div></div><!-- fragment --> 
</div>
</div>
<a id="afcee31e71fd6991148fd3bb619971e2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afcee31e71fd6991148fd3bb619971e2b">&#9670;&nbsp;</a></span>forEach() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp , typename Functor &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::forEach </td>
          <td>(</td>
          <td class="paramtype">const Functor &amp;&#160;</td>
          <td class="paramname"><em>operation</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a8aee95197c1ad458b37539bf9943ea80"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8aee95197c1ad458b37539bf9943ea80">&#9670;&nbsp;</a></span>getDefaultAllocator()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../df/d4c/classcv_1_1MatAllocator.html">MatAllocator</a>* cv::Mat::getDefaultAllocator </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a8d5dda7d818009547d71a086d3d755a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d5dda7d818009547d71a086d3d755a7">&#9670;&nbsp;</a></span>getStdAllocator()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../df/d4c/classcv_1_1MatAllocator.html">MatAllocator</a>* cv::Mat::getStdAllocator </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>and the standard allocator </p>

</div>
</div>
<a id="a6df360cd5a78aa8a3fcf2d445b7e7764"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6df360cd5a78aa8a3fcf2d445b7e7764">&#9670;&nbsp;</a></span>getUMat()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a> cv::Mat::getUMat </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga6226c29c7b0e7bda7aff72e96ba8e1df">AccessFlag</a>&#160;</td>
          <td class="paramname"><em>accessFlags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga5681439dda418431eb0a672697135ed2">UMatUsageFlags</a>&#160;</td>
          <td class="paramname"><em>usageFlags</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#gga5681439dda418431eb0a672697135ed2ae383b08ee18b73d8c1588d968f953893">USAGE_DEFAULT</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>retrieve <a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a> from <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> </p>

</div>
</div>
<a id="a039eb3c6740a850696a12519a4b8bfc6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a039eb3c6740a850696a12519a4b8bfc6">&#9670;&nbsp;</a></span>inv()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a> cv::Mat::inv </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>method</em> = <code><a class="el" href="../../d2/de8/group__core__array.html#ggaaf9ea5dcc392d5ae04eacb9920b9674ca247a3455cd64973152e17e26999dc024">DECOMP_LU</a></code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Inverses a matrix. </p>
<p>The method performs a matrix inversion by means of matrix expressions. This means that a temporary matrix inversion object is returned by the method and can be used further as a part of more complex matrix expressions or can be assigned to a matrix. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">method</td><td>Matrix inversion method. One of <a class="el" href="../../d2/de8/group__core__array.html#gaaf9ea5dcc392d5ae04eacb9920b9674c" title="matrix decomposition types ">cv::DecompTypes</a> </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../de/d45/samples_2cpp_2tutorial_code_2features2D_2Homography_2decompose_homography_8cpp-example.html#a18">samples/cpp/tutorial_code/features2D/Homography/decompose_homography.cpp</a>, and <a class="el" href="../../d9/d47/samples_2cpp_2tutorial_code_2features2D_2Homography_2homography_from_camera_displacement_8cpp-example.html#a22">samples/cpp/tutorial_code/features2D/Homography/homography_from_camera_displacement.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="aa90cea495029c7d1ee0a41361ccecdf3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa90cea495029c7d1ee0a41361ccecdf3">&#9670;&nbsp;</a></span>isContinuous()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool cv::Mat::isContinuous </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reports whether the matrix is continuous or not. </p>
<p>The method returns true if the matrix elements are stored continuously without gaps at the end of each row. Otherwise, it returns false. Obviously, 1x1 or 1xN matrices are always continuous. Matrices created with <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a55ced2c8d844d683ea9a725c60037ad0" title="Allocates new array data if needed. ">Mat::create</a> are always continuous. But if you extract a part of the matrix using <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a23df02a07ffbfa4aa59c19bc003919fe" title="Creates a matrix header for the specified matrix column. ">Mat::col</a>, <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a024cc0510a4c61c7f266d4ab9fe13d7a" title="Extracts a diagonal from a matrix. ">Mat::diag</a>, and so on, or constructed a matrix header for externally allocated data, such matrices may no longer have this property.</p>
<p>The continuity flag is stored as a bit in the <a class="el" href="../../d3/d63/classcv_1_1Mat.html#af9333f06c84f115fda4cdf3af18c2ad0">Mat::flags</a> field and is computed automatically when you construct a matrix header. Thus, the continuity check is a very fast operation, though theoretically it could be done as follows: </p><div class="fragment"><div class="line"><span class="comment">// alternative implementation of Mat::isContinuous()</span></div><div class="line"><span class="keywordtype">bool</span> myCheckMatContinuity(<span class="keyword">const</span> <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a>&amp; m)</div><div class="line">{</div><div class="line">    <span class="comment">//return (m.flags &amp; Mat::CONTINUOUS_FLAG) != 0;</span></div><div class="line">    <span class="keywordflow">return</span> m.rows == 1 || m.step == m.cols*m.elemSize();</div><div class="line">}</div></div><!-- fragment --><p> The method is used in quite a few of OpenCV functions. The point is that element-wise operations (such as arithmetic and logical operations, math functions, alpha blending, color space transformations, and others) do not depend on the image geometry. Thus, if all the input and output arrays are continuous, the functions can process them as very long single-row vectors. The example below illustrates how an alpha-blending function can be implemented: </p><div class="fragment"><div class="line"><span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><span class="keywordtype">void</span> alphaBlendRGBA(<span class="keyword">const</span> <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a>&amp; src1, <span class="keyword">const</span> <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a>&amp; src2, <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a>&amp; dst)</div><div class="line">{</div><div class="line">    <span class="keyword">const</span> <span class="keywordtype">float</span> alpha_scale = (float)<a class="code" href="../../d7/dcc/group__core__utils__softfloat.html#ga78f988f6cfa6223610298cbd4f86ec66">std::numeric_limits&lt;T&gt;::max</a>(),</div><div class="line">                inv_scale = 1.f/alpha_scale;</div><div class="line"></div><div class="line">    <a class="code" href="../../db/de0/group__core__utils.html#gaf62bcd90f70e275191ab95136d85906b">CV_Assert</a>( src1.type() == src2.type() &amp;&amp;</div><div class="line">               src1.type() == <a class="code" href="../../d1/d1b/group__core__hal__interface.html#gab2ebca36079fd923483abee99d7ff40d">CV_MAKETYPE</a>(traits::Depth&lt;T&gt;::value, 4) &amp;&amp;</div><div class="line">               src1.size() == src2.size());</div><div class="line">    <a class="code" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> size = src1.size();</div><div class="line">    dst.create(size, src1.type());</div><div class="line"></div><div class="line">    <span class="comment">// here is the idiom: check the arrays for continuity and,</span></div><div class="line">    <span class="comment">// if this is the case,</span></div><div class="line">    <span class="comment">// treat the arrays as 1D vectors</span></div><div class="line">    <span class="keywordflow">if</span>( src1.isContinuous() &amp;&amp; src2.isContinuous() &amp;&amp; dst.isContinuous() )</div><div class="line">    {</div><div class="line">        size.<a class="code" href="../../d6/d50/classcv_1_1Size__.html#abfe0367b32c407ddccf5ddf92667c73d">width</a> *= size.height;</div><div class="line">        size.height = 1;</div><div class="line">    }</div><div class="line">    size.width *= 4;</div><div class="line"></div><div class="line">    <span class="keywordflow">for</span>( <span class="keywordtype">int</span> i = 0; i &lt; size.height; i++ )</div><div class="line">    {</div><div class="line">        <span class="comment">// when the arrays are continuous,</span></div><div class="line">        <span class="comment">// the outer loop is executed only once</span></div><div class="line">        <span class="keyword">const</span> T* ptr1 = src1.ptr&lt;T&gt;(i);</div><div class="line">        <span class="keyword">const</span> T* ptr2 = src2.ptr&lt;T&gt;(i);</div><div class="line">        T* dptr = dst.ptr&lt;T&gt;(i);</div><div class="line"></div><div class="line">        <span class="keywordflow">for</span>( <span class="keywordtype">int</span> j = 0; j &lt; size.width; j += 4 )</div><div class="line">        {</div><div class="line">            <span class="keywordtype">float</span> alpha = ptr1[j+3]*inv_scale, beta = ptr2[j+3]*inv_scale;</div><div class="line">            dptr[j] = <a class="code" href="../../db/de0/group__core__utils.html#gab93126370b85fda2c8bfaf8c811faeaf">saturate_cast</a>&lt;T&gt;(ptr1[j]*alpha + ptr2[j]*beta);</div><div class="line">            dptr[j+1] = <a class="code" href="../../db/de0/group__core__utils.html#gab93126370b85fda2c8bfaf8c811faeaf">saturate_cast</a>&lt;T&gt;(ptr1[j+1]*alpha + ptr2[j+1]*beta);</div><div class="line">            dptr[j+2] = <a class="code" href="../../db/de0/group__core__utils.html#gab93126370b85fda2c8bfaf8c811faeaf">saturate_cast</a>&lt;T&gt;(ptr1[j+2]*alpha + ptr2[j+2]*beta);</div><div class="line">            dptr[j+3] = <a class="code" href="../../db/de0/group__core__utils.html#gab93126370b85fda2c8bfaf8c811faeaf">saturate_cast</a>&lt;T&gt;((1 - (1-alpha)*(1-beta))*alpha_scale);</div><div class="line">        }</div><div class="line">    }</div><div class="line">}</div></div><!-- fragment --><p> This approach, while being very simple, can boost the performance of a simple element-operation by 10-20 percents, especially if the image is rather small and the operation is quite simple.</p>
<p>Another OpenCV idiom in this function, a call of <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a55ced2c8d844d683ea9a725c60037ad0" title="Allocates new array data if needed. ">Mat::create</a> for the destination array, that allocates the destination array unless it already has the proper size and type. And while the newly allocated arrays are always continuous, you still need to check the destination array because <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a55ced2c8d844d683ea9a725c60037ad0" title="Allocates new array data if needed. ">Mat::create</a> does not always allocate a new matrix. </p>

</div>
</div>
<a id="ab34367822008627e80e144d7bba3bd70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab34367822008627e80e144d7bba3bd70">&#9670;&nbsp;</a></span>isSubmatrix()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool cv::Mat::isSubmatrix </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>returns true if the matrix is a submatrix of another matrix </p>

</div>
</div>
<a id="a40b5b3371a9c2a4b2b8ce0c8068d7c96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40b5b3371a9c2a4b2b8ce0c8068d7c96">&#9670;&nbsp;</a></span>locateROI()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::locateROI </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;&#160;</td>
          <td class="paramname"><em>wholeSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga1e83eafb2d26b3c93f09e8338bcab192">Point</a> &amp;&#160;</td>
          <td class="paramname"><em>ofs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Locates the matrix header within a parent matrix. </p>
<p>After you extracted a submatrix from a matrix using <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4b22e1c23af7a7f2eef8fa478cfa7434" title="Creates a matrix header for the specified matrix row. ">Mat::row</a>, <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a23df02a07ffbfa4aa59c19bc003919fe" title="Creates a matrix header for the specified matrix column. ">Mat::col</a>, <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa6542193430356ad631a9beabc624107" title="Creates a matrix header for the specified row span. ">Mat::rowRange</a>, <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aadc8f9210fe4dec50513746c246fa8d9" title="Creates a matrix header for the specified column span. ">Mat::colRange</a>, and others, the resultant submatrix points just to the part of the original big matrix. However, each submatrix contains information (represented by datastart and dataend fields) that helps reconstruct the original matrix size and the position of the extracted submatrix within the original matrix. The method locateROI does exactly that. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">wholeSize</td><td>Output parameter that contains the size of the whole matrix containing <em>this</em> as a part. </td></tr>
    <tr><td class="paramname">ofs</td><td>Output parameter that contains an offset of <em>this</em> inside the whole matrix. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a385c09827713dc3e6d713bfad8460706"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a385c09827713dc3e6d713bfad8460706">&#9670;&nbsp;</a></span>mul()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a> cv::Mat::mul </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>m</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>scale</em> = <code>1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Performs an element-wise multiplication or division of the two matrices. </p>
<p>The method returns a temporary object encoding per-element array multiplication, with optional scale. Note that this is not a matrix multiplication that corresponds to a simpler "\*" operator.</p>
<p>Example: </p><div class="fragment"><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> C = A.mul(5/B); <span class="comment">// equivalent to divide(A, B, C, 5)</span></div></div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>Another array of the same type and the same size as *this, or a matrix expression. </td></tr>
    <tr><td class="paramname">scale</td><td>Optional scale factor. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a69ae0402d116fc9c71908d8508dc2f09"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69ae0402d116fc9c71908d8508dc2f09">&#9670;&nbsp;</a></span>ones() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a> cv::Mat::ones </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cols</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns an array of all 1's of the specified size and type. </p>
<p>The method returns a Matlab-style 1's array initializer, similarly to <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a0b57b6a326c8876d944d188a46e0f556" title="Returns a zero array of the specified size and type. ">Mat::zeros</a>. Note that using this method you can initialize an array with an arbitrary value, using the following Matlab idiom: </p><div class="fragment"><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> A = <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a69ae0402d116fc9c71908d8508dc2f09">Mat::ones</a>(100, 100, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga32b18d904ee2b1731a9416a8eef67d06">CV_8U</a>)*3; <span class="comment">// make 100x100 matrix filled with 3.</span></div></div><!-- fragment --><p> The above operation does not form a 100x100 matrix of 1's and then multiply it by 3. Instead, it just remembers the scale factor (3 in this case) and use it when actually invoking the matrix initializer. </p><dl class="section note"><dt>Note</dt><dd>In case of multi-channels type, only the first channel will be initialized with 1's, the others will be set to 0's. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rows</td><td>Number of rows. </td></tr>
    <tr><td class="paramname">cols</td><td>Number of columns. </td></tr>
    <tr><td class="paramname">type</td><td>Created matrix type. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../da/d53/samples_2cpp_2demhist_8cpp-example.html#a5">samples/cpp/demhist.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="afc9c2c0b17ecd00932bc5fbc72f9bce0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc9c2c0b17ecd00932bc5fbc72f9bce0">&#9670;&nbsp;</a></span>ones() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a> cv::Mat::ones </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>Alternative to the matrix size specification Size(cols, rows) . </td></tr>
    <tr><td class="paramname">type</td><td>Created matrix type. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a6ed33f15d7bf0172efb62d61b3751284"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ed33f15d7bf0172efb62d61b3751284">&#9670;&nbsp;</a></span>ones() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a> cv::Mat::ones </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ndims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>sz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ndims</td><td>Array dimensionality. </td></tr>
    <tr><td class="paramname">sz</td><td>Array of integers specifying the array shape. </td></tr>
    <tr><td class="paramname">type</td><td>Created matrix type. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a75b1b5424cf014f00d8f06ba1818a5d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75b1b5424cf014f00d8f06ba1818a5d8">&#9670;&nbsp;</a></span>operator Matx< _Tp, m, n >()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp , int m, int n&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::operator <a class="el" href="../../de/de1/classcv_1_1Matx.html">Matx</a>&lt; _Tp, m, n &gt; </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a3896b518731a7a1e9cbf59aef1168734"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3896b518731a7a1e9cbf59aef1168734">&#9670;&nbsp;</a></span>operator std::array< _Tp, _Nm >()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp , std::size_t _Nm&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::operator std::array&lt; _Tp, _Nm &gt; </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a5d043937e7a4cad632397a9dd8dfee2e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d043937e7a4cad632397a9dd8dfee2e">&#9670;&nbsp;</a></span>operator std::vector< _Tp >()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::operator std::vector&lt; _Tp &gt; </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ae4766cf75071f4e4db698c4120abe57b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4766cf75071f4e4db698c4120abe57b">&#9670;&nbsp;</a></span>operator Vec< _Tp, n >()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp , int n&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">cv::Mat::operator <a class="el" href="../../d6/dcf/classcv_1_1Vec.html">Vec</a>&lt; _Tp, n &gt; </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ad543b6bd296ae1247032c750af4718e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad543b6bd296ae1247032c750af4718e1">&#9670;&nbsp;</a></span>operator()() <span class="overload">[1/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::operator() </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a>&#160;</td>
          <td class="paramname"><em>rowRange</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a>&#160;</td>
          <td class="paramname"><em>colRange</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Extracts a rectangular submatrix. </p>
<p>The operators make a new header for the specified sub-array of *this . They are the most generalized forms of <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4b22e1c23af7a7f2eef8fa478cfa7434" title="Creates a matrix header for the specified matrix row. ">Mat::row</a>, <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a23df02a07ffbfa4aa59c19bc003919fe" title="Creates a matrix header for the specified matrix column. ">Mat::col</a>, <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa6542193430356ad631a9beabc624107" title="Creates a matrix header for the specified row span. ">Mat::rowRange</a>, and <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aadc8f9210fe4dec50513746c246fa8d9" title="Creates a matrix header for the specified column span. ">Mat::colRange</a> . For example, <code>A(Range(0, 10), <a class="el" href="../../da/d35/classcv_1_1Range.html#af5a0207f6f98a69077db8e77898abc0f">Range::all()</a>)</code> is equivalent to <code>A.rowRange(0, 10)</code>. Similarly to all of the above, the operators are O(1) operations, that is, no matrix data is copied. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rowRange</td><td>Start and end row of the extracted submatrix. The upper boundary is not included. To select all the rows, use <a class="el" href="../../da/d35/classcv_1_1Range.html#af5a0207f6f98a69077db8e77898abc0f">Range::all()</a>. </td></tr>
    <tr><td class="paramname">colRange</td><td>Start and end column of the extracted submatrix. The upper boundary is not included. To select all the columns, use <a class="el" href="../../da/d35/classcv_1_1Range.html#af5a0207f6f98a69077db8e77898abc0f">Range::all()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a4272fce43d7405603fbb5e5f52580e57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4272fce43d7405603fbb5e5f52580e57">&#9670;&nbsp;</a></span>operator()() <span class="overload">[2/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::operator() </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> &amp;&#160;</td>
          <td class="paramname"><em>roi</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">roi</td><td>Extracted submatrix specified as a rectangle. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aee56475f834069b1fad3877c0747aaeb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee56475f834069b1fad3877c0747aaeb">&#9670;&nbsp;</a></span>operator()() <span class="overload">[3/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::operator() </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> *&#160;</td>
          <td class="paramname"><em>ranges</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ranges</td><td>Array of selected ranges along each array dimension. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa9bf4fcbb6e854a6db7b7254a205fac9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa9bf4fcbb6e854a6db7b7254a205fac9">&#9670;&nbsp;</a></span>operator()() <span class="overload">[4/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::operator() </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>ranges</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ranges</td><td>Array of selected ranges along each array dimension. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aed1f81fe7efaacc2bd95149cdfa34302"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed1f81fe7efaacc2bd95149cdfa34302">&#9670;&nbsp;</a></span>operator=() <span class="overload">[1/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&amp; cv::Mat::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>assignment operators </p>
<p>These are available assignment operators. Since they all are very different, make sure to read the operator parameters description. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>Assigned, right-hand-side matrix. Matrix assignment is an O(1) operation. This means that no data is copied but the data is shared and the reference counter, if any, is incremented. Before assigning new data, the old data is de-referenced via <a class="el" href="../../d3/d63/classcv_1_1Mat.html#ae48d4913285518e2c21a3457017e716e" title="Decrements the reference counter and deallocates the matrix if needed. ">Mat::release</a> . </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a2a0798475170fb3a23b5bc63686de334"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a0798475170fb3a23b5bc63686de334">&#9670;&nbsp;</a></span>operator=() <span class="overload">[2/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&amp; cv::Mat::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a> &amp;&#160;</td>
          <td class="paramname"><em>expr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">expr</td><td>Assigned matrix expression object. As opposite to the first form of the assignment operation, the second form can reuse already allocated matrix if it has the right size and type to fit the matrix expression result. It is automatically handled by the real function that the matrix expressions is expanded to. For example, C=A+B is expanded to add(A, B, C), and add takes care of automatic C reallocation. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa5c947f7e449a4d856a4f3a87fcebd50"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5c947f7e449a4d856a4f3a87fcebd50">&#9670;&nbsp;</a></span>operator=() <span class="overload">[3/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&amp; cv::Mat::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets all or some of the array elements to the specified value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>Assigned scalar converted to the actual array type. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a86d190d68dbd801a2bd555d0905979fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86d190d68dbd801a2bd555d0905979fd">&#9670;&nbsp;</a></span>operator=() <span class="overload">[4/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&amp; cv::Mat::operator= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&amp;&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a88bbb01901fdfe3f1d0592c592e8757c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a88bbb01901fdfe3f1d0592c592e8757c">&#9670;&nbsp;</a></span>pop_back()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::pop_back </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>nelems</em> = <code>1</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes elements from the bottom of the matrix. </p>
<p>The method removes one or more rows from the bottom of the matrix. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nelems</td><td>Number of removed rows. If it is greater than the total number of rows, an exception is thrown. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a13acd320291229615ef15f96ff1ff738"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a13acd320291229615ef15f96ff1ff738">&#9670;&nbsp;</a></span>ptr() <span class="overload">[1/20]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a>* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i0</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a pointer to the specified matrix row. </p>
<p>The methods return <code>uchar*</code> or typed pointer to the specified matrix row. See the sample in <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa90cea495029c7d1ee0a41361ccecdf3" title="Reports whether the matrix is continuous or not. ">Mat::isContinuous</a> to know how to use these methods. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">i0</td><td>A 0-based row index. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../dd/d93/samples_2cpp_2image_alignment_8cpp-example.html#a5">samples/cpp/image_alignment.cpp</a>, <a class="el" href="../../d0/df8/samples_2cpp_2train_HOG_8cpp-example.html#a11">samples/cpp/train_HOG.cpp</a>, <a class="el" href="../../d6/d39/samples_2dnn_2colorization_8cpp-example.html#a24">samples/dnn/colorization.cpp</a>, <a class="el" href="../../d7/d4f/samples_2dnn_2openpose_8cpp-example.html#a17">samples/dnn/openpose.cpp</a>, and <a class="el" href="../../d4/d88/samples_2dnn_2segmentation_8cpp-example.html#a34">samples/dnn/segmentation.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="af13f821918f452657f53bc3f750323cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af13f821918f452657f53bc3f750323cb">&#9670;&nbsp;</a></span>ptr() <span class="overload">[2/20]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a>* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i0</em> = <code>0</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="af774caab4a38c6f7890f3254ad71eccf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af774caab4a38c6f7890f3254ad71eccf">&#9670;&nbsp;</a></span>ptr() <span class="overload">[3/20]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a>* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>col</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">row</td><td>Index along the dimension 0 </td></tr>
    <tr><td class="paramname">col</td><td>Index along the dimension 1 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="abcfcc1798528b49495e1263eab31127d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abcfcc1798528b49495e1263eab31127d">&#9670;&nbsp;</a></span>ptr() <span class="overload">[4/20]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a>* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>col</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">row</td><td>Index along the dimension 0 </td></tr>
    <tr><td class="paramname">col</td><td>Index along the dimension 1 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad2bc0c6a23243540e16607868c17be92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad2bc0c6a23243540e16607868c17be92">&#9670;&nbsp;</a></span>ptr() <span class="overload">[5/20]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a>* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="abfb233ffa8b26a78c36e733f61da2a3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abfb233ffa8b26a78c36e733f61da2a3e">&#9670;&nbsp;</a></span>ptr() <span class="overload">[6/20]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a>* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="ab0e3de187bb27c384269b243e8789ba9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0e3de187bb27c384269b243e8789ba9">&#9670;&nbsp;</a></span>ptr() <span class="overload">[7/20]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a>* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a3ef72b9ebc9581796ed68382df8fb064"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ef72b9ebc9581796ed68382df8fb064">&#9670;&nbsp;</a></span>ptr() <span class="overload">[8/20]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a>* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a7ce1d8cc9a83ae7cab79766d0eb6c0a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ce1d8cc9a83ae7cab79766d0eb6c0a8">&#9670;&nbsp;</a></span>ptr() <span class="overload">[9/20]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int n&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a>* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d6/dcf/classcv_1_1Vec.html">Vec</a>&lt; int, n &gt; &amp;&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a9ea1a1bfbbb2393a4e162230dccbe1f0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ea1a1bfbbb2393a4e162230dccbe1f0">&#9670;&nbsp;</a></span>ptr() <span class="overload">[10/20]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int n&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a>* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d6/dcf/classcv_1_1Vec.html">Vec</a>&lt; int, n &gt; &amp;&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a5a9ffc908ac90604f36a8b6a1038747d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a9ffc908ac90604f36a8b6a1038747d">&#9670;&nbsp;</a></span>ptr() <span class="overload">[11/20]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">_Tp* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i0</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a6a6b3696440fe48751bfe60fe2a729f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a6b3696440fe48751bfe60fe2a729f3">&#9670;&nbsp;</a></span>ptr() <span class="overload">[12/20]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const _Tp* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i0</em> = <code>0</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a6f4278ede80e7a9fe55d8b03710e2343"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f4278ede80e7a9fe55d8b03710e2343">&#9670;&nbsp;</a></span>ptr() <span class="overload">[13/20]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">_Tp* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>col</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">row</td><td>Index along the dimension 0 </td></tr>
    <tr><td class="paramname">col</td><td>Index along the dimension 1 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="abda2b96aa438a808b43425040a7da81a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abda2b96aa438a808b43425040a7da81a">&#9670;&nbsp;</a></span>ptr() <span class="overload">[14/20]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const _Tp* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>row</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>col</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">row</td><td>Index along the dimension 0 </td></tr>
    <tr><td class="paramname">col</td><td>Index along the dimension 1 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a2bf43f93c5cb610b657bd6e0e091c062"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2bf43f93c5cb610b657bd6e0e091c062">&#9670;&nbsp;</a></span>ptr() <span class="overload">[15/20]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">_Tp* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a476f18d2b8d99748005150b24752512d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a476f18d2b8d99748005150b24752512d">&#9670;&nbsp;</a></span>ptr() <span class="overload">[16/20]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const _Tp* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a7cb2719706bcae72d26dbc9b2fdc02e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7cb2719706bcae72d26dbc9b2fdc02e6">&#9670;&nbsp;</a></span>ptr() <span class="overload">[17/20]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">_Tp* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="ac30da0a78cd38a72e8902f52660e2543"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac30da0a78cd38a72e8902f52660e2543">&#9670;&nbsp;</a></span>ptr() <span class="overload">[18/20]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const _Tp* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a36ab9a1de78fd00a4f9acf3c8a5d4d05"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a36ab9a1de78fd00a4f9acf3c8a5d4d05">&#9670;&nbsp;</a></span>ptr() <span class="overload">[19/20]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp , int n&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">_Tp* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d6/dcf/classcv_1_1Vec.html">Vec</a>&lt; int, n &gt; &amp;&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="a15cac608c7a27fb961a81b9409aaa7e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a15cac608c7a27fb961a81b9409aaa7e8">&#9670;&nbsp;</a></span>ptr() <span class="overload">[20/20]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp , int n&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const _Tp* cv::Mat::ptr </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d6/dcf/classcv_1_1Vec.html">Vec</a>&lt; int, n &gt; &amp;&#160;</td>
          <td class="paramname"><em>idx</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="af4bd5c2cb936dd363816d867aab22a61"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af4bd5c2cb936dd363816d867aab22a61">&#9670;&nbsp;</a></span>push_back() <span class="overload">[1/4]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::push_back </td>
          <td>(</td>
          <td class="paramtype">const _Tp &amp;&#160;</td>
          <td class="paramname"><em>elem</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds elements to the bottom of the matrix. </p>
<p>The methods add one or more elements to the bottom of the matrix. They emulate the corresponding method of the STL vector class. When elem is <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> , its type and the number of columns must be the same as in the container matrix. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">elem</td><td>Added element(s). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a1cfeb3a75570697426971403fc1ddb0d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1cfeb3a75570697426971403fc1ddb0d">&#9670;&nbsp;</a></span>push_back() <span class="overload">[2/4]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::push_back </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/dfc/classcv_1_1Mat__.html">Mat_</a>&lt; _Tp &gt; &amp;&#160;</td>
          <td class="paramname"><em>elem</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">elem</td><td>Added element(s). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a6fc040ee744749ba434fd5806ce2e3f2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6fc040ee744749ba434fd5806ce2e3f2">&#9670;&nbsp;</a></span>push_back() <span class="overload">[3/4]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Tp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::push_back </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; _Tp &gt; &amp;&#160;</td>
          <td class="paramname"><em>elem</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">elem</td><td>Added element(s). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a3676bae1741459eda3771e8653357c53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3676bae1741459eda3771e8653357c53">&#9670;&nbsp;</a></span>push_back() <span class="overload">[4/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::push_back </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;&#160;</td>
          <td class="paramname"><em>m</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">m</td><td>Added line(s). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a57c658e2a97dda24fef1be2e625da914"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a57c658e2a97dda24fef1be2e625da914">&#9670;&nbsp;</a></span>push_back_()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::push_back_ </td>
          <td>(</td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>elem</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>internal function </p>

</div>
</div>
<a id="ae48d4913285518e2c21a3457017e716e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae48d4913285518e2c21a3457017e716e">&#9670;&nbsp;</a></span>release()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::release </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decrements the reference counter and deallocates the matrix if needed. </p>
<p>The method decrements the reference counter associated with the matrix data. When the reference counter reaches 0, the matrix data is deallocated and the data and the reference counter pointers are set to NULL's. If the matrix header points to an external data set (see <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat::Mat</a> ), the reference counter is NULL, and the method has no effect in this case.</p>
<p>This method can be called manually to force the matrix data deallocation. But since this method is automatically called in the destructor, or by any other method that changes the data pointer, it is usually not needed. The reference counter decrement and check for 0 is an atomic operation on the platforms that support it. Thus, it is safe to operate on the same matrices asynchronously in different threads. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d9/dd8/samples_2cpp_2stitching_detailed_8cpp-example.html#a16">samples/cpp/stitching_detailed.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a0706ed6c42e288926c5ad415b976bbe2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0706ed6c42e288926c5ad415b976bbe2">&#9670;&nbsp;</a></span>reserve()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::reserve </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reserves space for the certain number of rows. </p>
<p>The method reserves space for sz rows. If the matrix already has enough space to store sz rows, nothing happens. If the matrix is reallocated, the first <a class="el" href="../../d3/d63/classcv_1_1Mat.html#abed816466c45234254d25bc59c31245e" title="the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions ...">Mat::rows</a> rows are preserved. The method emulates the corresponding method of the STL vector class. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sz</td><td>Number of rows. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a923eead22fe7f0c48aa000158df920f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a923eead22fe7f0c48aa000158df920f3">&#9670;&nbsp;</a></span>reserveBuffer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::reserveBuffer </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reserves space for the certain number of bytes. </p>
<p>The method reserves space for sz bytes. If the matrix already has enough space to store sz bytes, nothing happens. If matrix has to be reallocated its previous content could be lost. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sz</td><td>Number of bytes. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a4eb96e3251417fa88b78e2abd6cfd7d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4eb96e3251417fa88b78e2abd6cfd7d8">&#9670;&nbsp;</a></span>reshape() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::reshape </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rows</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Changes the shape and/or the number of channels of a 2D matrix without copying the data. </p>
<p>The method makes a new matrix header for *this elements. The new matrix may have a different size and/or different number of channels. Any combination is possible if:</p><ul>
<li>No extra elements are included into the new matrix and no elements are excluded. Consequently, the product rows*cols*channels() must stay the same after the transformation.</li>
<li>No data is copied. That is, this is an O(1) operation. Consequently, if you change the number of rows, or the operation changes the indices of elements row in some other way, the matrix must be continuous. See <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa90cea495029c7d1ee0a41361ccecdf3" title="Reports whether the matrix is continuous or not. ">Mat::isContinuous</a> .</li>
</ul>
<p>For example, if there is a set of 3D points stored as an STL vector, and you want to represent the points as a 3xN matrix, do the following: </p><div class="fragment"><div class="line">std::vector&lt;Point3f&gt; vec;</div><div class="line">...</div><div class="line">Mat pointMat = <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a>(vec). <span class="comment">// convert vector to Mat, O(1) operation</span></div><div class="line">                  <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a4eb96e3251417fa88b78e2abd6cfd7d8">reshape</a>(1). <span class="comment">// make Nx3 1-channel matrix out of Nx1 3-channel.</span></div><div class="line">                              <span class="comment">// Also, an O(1) operation</span></div><div class="line">                     <a class="code" href="../../d3/d63/classcv_1_1Mat.html#aaa428c60ccb6d8ea5de18f63dfac8e11">t</a>(); <span class="comment">// finally, transpose the Nx3 matrix.</span></div><div class="line">                          <span class="comment">// This involves copying all the elements</span></div></div><!-- fragment --> <dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cn</td><td>New number of channels. If the parameter is 0, the number of channels remains the same. </td></tr>
    <tr><td class="paramname">rows</td><td>New number of rows. If the parameter is 0, the number of rows remains the same. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d3/db0/samples_2cpp_2pca_8cpp-example.html#a17">samples/cpp/pca.cpp</a>, and <a class="el" href="../../d9/d8d/samples_2dnn_2classification_8cpp-example.html#a29">samples/dnn/classification.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a50e606fe51f53b896b66051634a018fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a50e606fe51f53b896b66051634a018fb">&#9670;&nbsp;</a></span>reshape() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::reshape </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>newndims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>newsz</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="ab2e41a510891e548f744832cf9b8ab89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab2e41a510891e548f744832cf9b8ab89">&#9670;&nbsp;</a></span>reshape() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::reshape </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; int &gt; &amp;&#160;</td>
          <td class="paramname"><em>newshape</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>

</div>
</div>
<a id="ad0127b138acfcc2dcd5dafc51175b309"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0127b138acfcc2dcd5dafc51175b309">&#9670;&nbsp;</a></span>resize() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::resize </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Changes the number of matrix rows. </p>
<p>The methods change the number of matrix rows. If the matrix is reallocated, the first min(Mat::rows, sz) rows are preserved. The methods emulate the corresponding methods of the STL vector class. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sz</td><td>New number of rows. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="abdbf4852beb3af95977fa289f6c7034c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abdbf4852beb3af95977fa289f6c7034c">&#9670;&nbsp;</a></span>resize() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::resize </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>sz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;&#160;</td>
          <td class="paramname"><em>s</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sz</td><td>New number of rows. </td></tr>
    <tr><td class="paramname">s</td><td>Value assigned to the newly added elements. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a4b22e1c23af7a7f2eef8fa478cfa7434"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b22e1c23af7a7f2eef8fa478cfa7434">&#9670;&nbsp;</a></span>row()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::row </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a matrix header for the specified matrix row. </p>
<p>The method makes a new header for the specified matrix row and returns it. This is an O(1) operation, regardless of the matrix size. The underlying data of the new matrix is shared with the original matrix. Here is the example of one of the classical basic matrix processing operations, axpy, used by LU and many other algorithms: </p><div class="fragment"><div class="line"><span class="keyword">inline</span> <span class="keywordtype">void</span> matrix_axpy(<a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a>&amp; A, <span class="keywordtype">int</span> i, <span class="keywordtype">int</span> j, <span class="keywordtype">double</span> alpha)</div><div class="line">{</div><div class="line">    A.row(i) += A.row(j)*alpha;</div><div class="line">}</div></div><!-- fragment --> <dl class="section note"><dt>Note</dt><dd>In the current implementation, the following code does not work as expected: <div class="fragment"><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> A;</div><div class="line">...</div><div class="line">A.row(i) = A.row(j); <span class="comment">// will not work</span></div></div><!-- fragment --> This happens because A.row(i) forms a temporary header that is further assigned to another header. Remember that each of these operations is O(1), that is, no data is copied. Thus, the above assignment is not true if you may have expected the j-th row to be copied to the i-th row. To achieve that, you should either turn this simple assignment into an expression or use the <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a33fd5d125b4c302b0c9aa86980791a77" title="Copies the matrix to another one. ">Mat::copyTo</a> method: <div class="fragment"><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> A;</div><div class="line">...</div><div class="line"><span class="comment">// works, but looks a bit obscure.</span></div><div class="line">A.row(i) = A.row(j) + 0;</div><div class="line"><span class="comment">// this is a bit longer, but the recommended method.</span></div><div class="line">A.row(j).copyTo(A.row(i));</div></div><!-- fragment --> </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">y</td><td>A 0-based row index. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d3/db0/samples_2cpp_2pca_8cpp-example.html#a6">samples/cpp/pca.cpp</a>, and <a class="el" href="../../d0/df8/samples_2cpp_2train_HOG_8cpp-example.html#a15">samples/cpp/train_HOG.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="aa6542193430356ad631a9beabc624107"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6542193430356ad631a9beabc624107">&#9670;&nbsp;</a></span>rowRange() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::rowRange </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>startrow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>endrow</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a matrix header for the specified row span. </p>
<p>The method makes a new header for the specified row span of the matrix. Similarly to <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a4b22e1c23af7a7f2eef8fa478cfa7434" title="Creates a matrix header for the specified matrix row. ">Mat::row</a> and <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a23df02a07ffbfa4aa59c19bc003919fe" title="Creates a matrix header for the specified matrix column. ">Mat::col</a> , this is an O(1) operation. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">startrow</td><td>An inclusive 0-based start index of the row span. </td></tr>
    <tr><td class="paramname">endrow</td><td>An exclusive 0-based ending index of the row span. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d9/dde/samples_2cpp_2kmeans_8cpp-example.html#a13">samples/cpp/kmeans.cpp</a>, and <a class="el" href="../../d4/d88/samples_2dnn_2segmentation_8cpp-example.html#a39">samples/dnn/segmentation.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a6f5b8257ea38a26295944e9a69caf7e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f5b8257ea38a26295944e9a69caf7e7">&#9670;&nbsp;</a></span>rowRange() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::Mat::rowRange </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../da/d35/classcv_1_1Range.html">Range</a> &amp;&#160;</td>
          <td class="paramname"><em>r</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td><a class="el" href="../../da/d35/classcv_1_1Range.html" title="Template class specifying a continuous subsequence (slice) of a sequence. ">Range</a> structure containing both the start and the end indices. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a536a771cbad0b8360091e0315ebfc524"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a536a771cbad0b8360091e0315ebfc524">&#9670;&nbsp;</a></span>setDefaultAllocator()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void cv::Mat::setDefaultAllocator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../df/d4c/classcv_1_1MatAllocator.html">MatAllocator</a> *&#160;</td>
          <td class="paramname"><em>allocator</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a0440e2a164c0b0d8462fb1e487be9876"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0440e2a164c0b0d8462fb1e487be9876">&#9670;&nbsp;</a></span>setTo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&amp; cv::Mat::setTo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a>&#160;</td>
          <td class="paramname"><em>mask</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#gad9287b23bba2fed753b36ef561ae7346">noArray</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets all or some of the array elements to the specified value. </p>
<p>This is an advanced variant of the <a class="el" href="../../d3/d63/classcv_1_1Mat.html#aa5c947f7e449a4d856a4f3a87fcebd50" title="Sets all or some of the array elements to the specified value. ">Mat::operator=(const Scalar&amp; s)</a> operator. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>Assigned scalar converted to the actual array type. </td></tr>
    <tr><td class="paramname">mask</td><td>Operation mask of the same size as *this. Its non-zero elements indicate which matrix elements need to be copied. The mask has to be of type CV_8U and can have 1 or multiple channels </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d9/dd8/samples_2cpp_2stitching_detailed_8cpp-example.html#a52">samples/cpp/stitching_detailed.cpp</a>, and <a class="el" href="../../d4/d88/samples_2dnn_2segmentation_8cpp-example.html#a40">samples/dnn/segmentation.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a0066c8eee40c1706395b1e57f00e0857"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0066c8eee40c1706395b1e57f00e0857">&#9670;&nbsp;</a></span>step1()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t cv::Mat::step1 </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i</em> = <code>0</code></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a normalized step. </p>
<p>The method returns a matrix step divided by <a class="el" href="../../d3/d63/classcv_1_1Mat.html#a9acde8f32d4b294558fb406bc05171bc" title="Returns the size of each matrix element channel in bytes. ">Mat::elemSize1()</a> . It can be useful to quickly access an arbitrary matrix element. </p>

</div>
</div>
<a id="aaa428c60ccb6d8ea5de18f63dfac8e11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa428c60ccb6d8ea5de18f63dfac8e11">&#9670;&nbsp;</a></span>t()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a> cv::Mat::t </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Transposes a matrix. </p>
<p>The method performs matrix transposition by means of matrix expressions. It does not perform the actual transposition but returns a temporary matrix transposition object that can be further used as a part of more complex matrix expressions or can be assigned to a matrix: </p><div class="fragment"><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> A1 = A + <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2cf9b9acde7a9852542bbc20ef851ed2">Mat::eye</a>(A.size(), A.type())*lambda;</div><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> C = A1.t()*A1; <span class="comment">// compute (A + lambda*I)^t * (A + lamda*I)</span></div></div><!-- fragment --> <dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../de/d45/samples_2cpp_2tutorial_code_2features2D_2Homography_2decompose_homography_8cpp-example.html#a7">samples/cpp/tutorial_code/features2D/Homography/decompose_homography.cpp</a>, and <a class="el" href="../../d9/d47/samples_2cpp_2tutorial_code_2features2D_2Homography_2homography_from_camera_displacement_8cpp-example.html#a7">samples/cpp/tutorial_code/features2D/Homography/homography_from_camera_displacement.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="aa4d317d43fb0cba9c2503f3c61b866c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa4d317d43fb0cba9c2503f3c61b866c8">&#9670;&nbsp;</a></span>total() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t cv::Mat::total </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the total number of array elements. </p>
<p>The method returns the number of array elements (a number of pixels if the array represents an image). </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d0/df8/samples_2cpp_2train_HOG_8cpp-example.html#a5">samples/cpp/train_HOG.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a5c506fc8b2cf52375e0d8be26aae0df4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c506fc8b2cf52375e0d8be26aae0df4">&#9670;&nbsp;</a></span>total() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t cv::Mat::total </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>startDim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>endDim</em> = <code>INT_MAX</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the total number of array elements. </p>
<p>The method returns the number of elements within a certain sub-array slice with startDim &lt;= dim &lt; endDim </p>

</div>
</div>
<a id="af2d2652e552d7de635988f18a84b53e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af2d2652e552d7de635988f18a84b53e5">&#9670;&nbsp;</a></span>type()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::Mat::type </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the type of a matrix element. </p>
<p>The method returns a matrix element type. This is an identifier compatible with the CvMat type system, like CV_16SC3 or 16-bit signed 3-channel array, and so on. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d8/d34/samples_2cpp_2grabcut_8cpp-example.html#a6">samples/cpp/grabcut.cpp</a>, <a class="el" href="../../dd/d93/samples_2cpp_2image_alignment_8cpp-example.html#a2">samples/cpp/image_alignment.cpp</a>, <a class="el" href="../../d0/df8/samples_2cpp_2train_HOG_8cpp-example.html#a6">samples/cpp/train_HOG.cpp</a>, and <a class="el" href="../../d3/d8f/samples_2cpp_2tutorial_code_2ImgProc_2Smoothing_2Smoothing_8cpp-example.html#a15">samples/cpp/tutorial_code/ImgProc/Smoothing/Smoothing.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a3520c52cecff18ab7b243b2b45df7bc0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3520c52cecff18ab7b243b2b45df7bc0">&#9670;&nbsp;</a></span>updateContinuityFlag()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::Mat::updateContinuityFlag </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>internal use method: updates the continuity flag </p>

</div>
</div>
<a id="a0b57b6a326c8876d944d188a46e0f556"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b57b6a326c8876d944d188a46e0f556">&#9670;&nbsp;</a></span>zeros() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a> cv::Mat::zeros </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cols</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a zero array of the specified size and type. </p>
<p>The method returns a Matlab-style zero array initializer. It can be used to quickly form a constant array as a function parameter, part of a matrix expression, or as a matrix initializer: </p><div class="fragment"><div class="line"><a class="code" href="../../d3/d63/classcv_1_1Mat.html#a2c4229732da267f1fe385458af3896d8">Mat</a> A;</div><div class="line">A = <a class="code" href="../../d3/d63/classcv_1_1Mat.html#a0b57b6a326c8876d944d188a46e0f556">Mat::zeros</a>(3, 3, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga4a3def5d72b74bed31f5f8ab7676099c">CV_32F</a>);</div></div><!-- fragment --><p> In the example above, a new matrix is allocated only if A is not a 3x3 floating-point matrix. Otherwise, the existing matrix A is filled with zeros. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rows</td><td>Number of rows. </td></tr>
    <tr><td class="paramname">cols</td><td>Number of columns. </td></tr>
    <tr><td class="paramname">type</td><td>Created matrix type. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d6/d7f/samples_2cpp_2camshiftdemo_8cpp-example.html#a28">samples/cpp/camshiftdemo.cpp</a>, <a class="el" href="../../da/d32/samples_2cpp_2contours2_8cpp-example.html#a1">samples/cpp/contours2.cpp</a>, <a class="el" href="../../d2/dcf/samples_2cpp_2falsecolor_8cpp-example.html#a10">samples/cpp/falsecolor.cpp</a>, <a class="el" href="../../d9/d73/samples_2cpp_2fitellipse_8cpp-example.html#a16">samples/cpp/fitellipse.cpp</a>, <a class="el" href="../../de/d70/samples_2cpp_2kalman_8cpp-example.html#a9">samples/cpp/kalman.cpp</a>, <a class="el" href="../../d2/dda/samples_2cpp_2tutorial_code_2ImgProc_2basic_drawing_2Drawing_1_8cpp-example.html#a2">samples/cpp/tutorial_code/ImgProc/basic_drawing/Drawing_1.cpp</a>, <a class="el" href="../../de/d06/samples_2cpp_2tutorial_code_2ImgProc_2basic_drawing_2Drawing_2_8cpp-example.html#a3">samples/cpp/tutorial_code/ImgProc/basic_drawing/Drawing_2.cpp</a>, and <a class="el" href="../../d4/d88/samples_2dnn_2segmentation_8cpp-example.html#a30">samples/dnn/segmentation.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a095db10924bc801644a29074a755b6e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a095db10924bc801644a29074a755b6e9">&#9670;&nbsp;</a></span>zeros() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a> cv::Mat::zeros </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">size</td><td>Alternative to the matrix size specification Size(cols, rows) . </td></tr>
    <tr><td class="paramname">type</td><td>Created matrix type. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a961cf7d4f82253d93bb5b8ff54522087"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a961cf7d4f82253d93bb5b8ff54522087">&#9670;&nbsp;</a></span>zeros() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../d1/d10/classcv_1_1MatExpr.html">MatExpr</a> cv::Mat::zeros </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ndims</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int *&#160;</td>
          <td class="paramname"><em>sz</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ndims</td><td>Array dimensionality. </td></tr>
    <tr><td class="paramname">sz</td><td>Array of integers specifying the array shape. </td></tr>
    <tr><td class="paramname">type</td><td>Created matrix type. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a4d2eb7a536cd5a0f18808b6112111d6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d2eb7a536cd5a0f18808b6112111d6a">&#9670;&nbsp;</a></span>allocator</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/d4c/classcv_1_1MatAllocator.html">MatAllocator</a>* cv::Mat::allocator</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>custom allocator </p>

</div>
</div>
<a id="aa3e5a47585c9ef6a0842556739155e3e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa3e5a47585c9ef6a0842556739155e3e">&#9670;&nbsp;</a></span>cols</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::Mat::cols</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d6/d7f/samples_2cpp_2camshiftdemo_8cpp-example.html#a12">samples/cpp/camshiftdemo.cpp</a>, <a class="el" href="../../d5/d04/samples_2cpp_2convexhull_8cpp-example.html#a9">samples/cpp/convexhull.cpp</a>, <a class="el" href="../../da/d53/samples_2cpp_2demhist_8cpp-example.html#a12">samples/cpp/demhist.cpp</a>, <a class="el" href="../../d4/d26/samples_2cpp_2facedetect_8cpp-example.html#a33">samples/cpp/facedetect.cpp</a>, <a class="el" href="../../d2/dcf/samples_2cpp_2falsecolor_8cpp-example.html#a17">samples/cpp/falsecolor.cpp</a>, <a class="el" href="../../d9/d73/samples_2cpp_2fitellipse_8cpp-example.html#a31">samples/cpp/fitellipse.cpp</a>, <a class="el" href="../../d8/d34/samples_2cpp_2grabcut_8cpp-example.html#a11">samples/cpp/grabcut.cpp</a>, <a class="el" href="../../dd/d93/samples_2cpp_2image_alignment_8cpp-example.html#a10">samples/cpp/image_alignment.cpp</a>, <a class="el" href="../../de/d70/samples_2cpp_2kalman_8cpp-example.html#a20">samples/cpp/kalman.cpp</a>, <a class="el" href="../../d9/dde/samples_2cpp_2kmeans_8cpp-example.html#a10">samples/cpp/kmeans.cpp</a>, <a class="el" href="../../df/dee/samples_2cpp_2minarea_8cpp-example.html#a8">samples/cpp/minarea.cpp</a>, <a class="el" href="../../db/d00/samples_2cpp_2squares_8cpp-example.html#a10">samples/cpp/squares.cpp</a>, <a class="el" href="../../db/db4/samples_2cpp_2stitching_8cpp-example.html#a6">samples/cpp/stitching.cpp</a>, <a class="el" href="../../d0/df8/samples_2cpp_2train_HOG_8cpp-example.html#a10">samples/cpp/train_HOG.cpp</a>, <a class="el" href="../../d8/ded/samples_2cpp_2tutorial_code_2Histograms_Matching_2MatchTemplate_Demo_8cpp-example.html#a10">samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp</a>, <a class="el" href="../../df/d5e/samples_2cpp_2tutorial_code_2ImgProc_2Morphology_1_8cpp-example.html#a9">samples/cpp/tutorial_code/ImgProc/Morphology_1.cpp</a>, <a class="el" href="../../d3/d08/samples_2cpp_2tutorial_code_2ImgProc_2Pyramids_2Pyramids_8cpp-example.html#a8">samples/cpp/tutorial_code/ImgProc/Pyramids/Pyramids.cpp</a>, <a class="el" href="../../d3/d8f/samples_2cpp_2tutorial_code_2ImgProc_2Smoothing_2Smoothing_8cpp-example.html#a17">samples/cpp/tutorial_code/ImgProc/Smoothing/Smoothing.cpp</a>, <a class="el" href="../../d6/d14/samples_2cpp_2tutorial_code_2ImgTrans_2copyMakeBorder_demo_8cpp-example.html#a10">samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp</a>, <a class="el" href="../../de/dd4/samples_2cpp_2warpPerspective_demo_8cpp-example.html#a7">samples/cpp/warpPerspective_demo.cpp</a>, <a class="el" href="../../d4/d40/samples_2cpp_2watershed_8cpp-example.html#a2">samples/cpp/watershed.cpp</a>, <a class="el" href="../../d4/db9/samples_2dnn_2object_detection_8cpp-example.html#a33">samples/dnn/object_detection.cpp</a>, and <a class="el" href="../../d7/d4f/samples_2dnn_2openpose_8cpp-example.html#a20">samples/dnn/openpose.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a4d33bed1c850265370d2af0ff02e1564"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d33bed1c850265370d2af0ff02e1564">&#9670;&nbsp;</a></span>data</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a>* cv::Mat::data</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>pointer to the data </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d4/d88/samples_2dnn_2segmentation_8cpp-example.html#a33">samples/dnn/segmentation.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ae756e84c94cbcf4c152ed0e67edb71ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae756e84c94cbcf4c152ed0e67edb71ca">&#9670;&nbsp;</a></span>dataend</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a>* cv::Mat::dataend</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a21a0a0eb9814f0093452601fcbdc8a46"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a21a0a0eb9814f0093452601fcbdc8a46">&#9670;&nbsp;</a></span>datalimit</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a>* cv::Mat::datalimit</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="aeda6d607bfc629a95f59e7b538832172"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeda6d607bfc629a95f59e7b538832172">&#9670;&nbsp;</a></span>datastart</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a>* cv::Mat::datastart</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>helper fields used in locateROI and adjustROI </p>

</div>
</div>
<a id="a39cf614aa52567e9a945cd2609bd767b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a39cf614aa52567e9a945cd2609bd767b">&#9670;&nbsp;</a></span>dims</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::Mat::dims</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>the matrix dimensionality, &gt;= 2 </p>

</div>
</div>
<a id="af9333f06c84f115fda4cdf3af18c2ad0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9333f06c84f115fda4cdf3af18c2ad0">&#9670;&nbsp;</a></span>flags</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::Mat::flags</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>includes several bit-fields:</p><ul>
<li>the magic signature</li>
<li>continuity flag</li>
<li>depth</li>
<li>number of channels </li>
</ul>

</div>
</div>
<a id="abed816466c45234254d25bc59c31245e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abed816466c45234254d25bc59c31245e">&#9670;&nbsp;</a></span>rows</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::Mat::rows</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>the number of rows and columns or (-1, -1) when the matrix has more than 2 dimensions </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d6/d7f/samples_2cpp_2camshiftdemo_8cpp-example.html#a13">samples/cpp/camshiftdemo.cpp</a>, <a class="el" href="../../d5/d04/samples_2cpp_2convexhull_8cpp-example.html#a11">samples/cpp/convexhull.cpp</a>, <a class="el" href="../../da/d53/samples_2cpp_2demhist_8cpp-example.html#a7">samples/cpp/demhist.cpp</a>, <a class="el" href="../../d2/dcf/samples_2cpp_2falsecolor_8cpp-example.html#a18">samples/cpp/falsecolor.cpp</a>, <a class="el" href="../../d9/d73/samples_2cpp_2fitellipse_8cpp-example.html#a50">samples/cpp/fitellipse.cpp</a>, <a class="el" href="../../d8/d34/samples_2cpp_2grabcut_8cpp-example.html#a10">samples/cpp/grabcut.cpp</a>, <a class="el" href="../../dd/d93/samples_2cpp_2image_alignment_8cpp-example.html#a9">samples/cpp/image_alignment.cpp</a>, <a class="el" href="../../de/d70/samples_2cpp_2kalman_8cpp-example.html#a21">samples/cpp/kalman.cpp</a>, <a class="el" href="../../d9/dde/samples_2cpp_2kmeans_8cpp-example.html#a12">samples/cpp/kmeans.cpp</a>, <a class="el" href="../../df/dee/samples_2cpp_2minarea_8cpp-example.html#a10">samples/cpp/minarea.cpp</a>, <a class="el" href="../../db/d00/samples_2cpp_2squares_8cpp-example.html#a11">samples/cpp/squares.cpp</a>, <a class="el" href="../../db/db4/samples_2cpp_2stitching_8cpp-example.html#a7">samples/cpp/stitching.cpp</a>, <a class="el" href="../../d0/df8/samples_2cpp_2train_HOG_8cpp-example.html#a3">samples/cpp/train_HOG.cpp</a>, <a class="el" href="../../d8/ded/samples_2cpp_2tutorial_code_2Histograms_Matching_2MatchTemplate_Demo_8cpp-example.html#a11">samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp</a>, <a class="el" href="../../d3/d08/samples_2cpp_2tutorial_code_2ImgProc_2Pyramids_2Pyramids_8cpp-example.html#a9">samples/cpp/tutorial_code/ImgProc/Pyramids/Pyramids.cpp</a>, <a class="el" href="../../d3/d8f/samples_2cpp_2tutorial_code_2ImgProc_2Smoothing_2Smoothing_8cpp-example.html#a18">samples/cpp/tutorial_code/ImgProc/Smoothing/Smoothing.cpp</a>, <a class="el" href="../../d6/d14/samples_2cpp_2tutorial_code_2ImgTrans_2copyMakeBorder_demo_8cpp-example.html#a9">samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp</a>, <a class="el" href="../../d1/de6/samples_2cpp_2tutorial_code_2ImgTrans_2houghcircles_8cpp-example.html#a10">samples/cpp/tutorial_code/ImgTrans/houghcircles.cpp</a>, <a class="el" href="../../da/d94/samples_2cpp_2tutorial_code_2ml_2introduction_to_pca_2introduction_to_pca_8cpp-example.html#a15">samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp</a>, <a class="el" href="../../de/dd4/samples_2cpp_2warpPerspective_demo_8cpp-example.html#a8">samples/cpp/warpPerspective_demo.cpp</a>, <a class="el" href="../../d4/d40/samples_2cpp_2watershed_8cpp-example.html#a3">samples/cpp/watershed.cpp</a>, <a class="el" href="../../d4/db9/samples_2dnn_2object_detection_8cpp-example.html#a35">samples/dnn/object_detection.cpp</a>, and <a class="el" href="../../d7/d4f/samples_2dnn_2openpose_8cpp-example.html#a21">samples/dnn/openpose.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a146f8e8dda07d1365a575ab83d9828d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a146f8e8dda07d1365a575ab83d9828d1">&#9670;&nbsp;</a></span>size</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/d63/structcv_1_1MatSize.html">MatSize</a> cv::Mat::size</td>
        </tr>
      </table>
</div><div class="memdoc">
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d1/d9e/fld_lines_8cpp-example.html#a15">fld_lines.cpp</a>, <a class="el" href="../../d6/d7f/samples_2cpp_2camshiftdemo_8cpp-example.html#a37">samples/cpp/camshiftdemo.cpp</a>, <a class="el" href="../../de/d01/samples_2cpp_2connected_components_8cpp-example.html#a1">samples/cpp/connected_components.cpp</a>, <a class="el" href="../../db/d75/samples_2cpp_2create_mask_8cpp-example.html#a14">samples/cpp/create_mask.cpp</a>, <a class="el" href="../../d8/d34/samples_2cpp_2grabcut_8cpp-example.html#a13">samples/cpp/grabcut.cpp</a>, <a class="el" href="../../dd/d93/samples_2cpp_2image_alignment_8cpp-example.html#a44">samples/cpp/image_alignment.cpp</a>, <a class="el" href="../../d4/d35/samples_2cpp_2polar_transforms_8cpp-example.html#a25">samples/cpp/polar_transforms.cpp</a>, <a class="el" href="../../d5/de8/samples_2cpp_2segment_objects_8cpp-example.html#a8">samples/cpp/segment_objects.cpp</a>, <a class="el" href="../../db/d00/samples_2cpp_2squares_8cpp-example.html#a6">samples/cpp/squares.cpp</a>, <a class="el" href="../../d9/dd8/samples_2cpp_2stitching_detailed_8cpp-example.html#a7">samples/cpp/stitching_detailed.cpp</a>, <a class="el" href="../../d9/d47/samples_2cpp_2tutorial_code_2features2D_2Homography_2homography_from_camera_displacement_8cpp-example.html#a26">samples/cpp/tutorial_code/features2D/Homography/homography_from_camera_displacement.cpp</a>, <a class="el" href="../../d3/d8f/samples_2cpp_2tutorial_code_2ImgProc_2Smoothing_2Smoothing_8cpp-example.html#a14">samples/cpp/tutorial_code/ImgProc/Smoothing/Smoothing.cpp</a>, <a class="el" href="../../dc/d23/samples_2cpp_2tutorial_code_2photo_2seamless_cloning_2cloning_demo_8cpp-example.html#a11">samples/cpp/tutorial_code/photo/seamless_cloning/cloning_demo.cpp</a>, <a class="el" href="../../d4/d40/samples_2cpp_2watershed_8cpp-example.html#a29">samples/cpp/watershed.cpp</a>, <a class="el" href="../../d6/d39/samples_2dnn_2colorization_8cpp-example.html#a23">samples/dnn/colorization.cpp</a>, <a class="el" href="../../d7/d4f/samples_2dnn_2openpose_8cpp-example.html#a15">samples/dnn/openpose.cpp</a>, and <a class="el" href="../../d4/d88/samples_2dnn_2segmentation_8cpp-example.html#a20">samples/dnn/segmentation.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ab4b0843e64328eb2a026b5b9ede726fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab4b0843e64328eb2a026b5b9ede726fe">&#9670;&nbsp;</a></span>step</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d4/d26/structcv_1_1MatStep.html">MatStep</a> cv::Mat::step</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a2742469fe595e1b9036f60d752d08461"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2742469fe595e1b9036f60d752d08461">&#9670;&nbsp;</a></span>u</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d58/structcv_1_1UMatData.html">UMatData</a>* cv::Mat::u</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>interaction with <a class="el" href="../../d7/d45/classcv_1_1UMat.html">UMat</a> </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>opencv2/core/<a class="el" href="../../d3/d82/core_2include_2opencv2_2core_2mat_8hpp.html">mat.hpp</a></li>
<li>opencv2/core/<a class="el" href="../../d1/d4e/utility_8hpp.html">utility.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:43 for OpenCV by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
